mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-20 18:45:55 +00:00
bad currency guard
This commit is contained in:
committed by
Richard Holland
parent
4e6e81f5de
commit
31da4bf8d4
@@ -491,6 +491,9 @@ PayChanFund::doApply()
|
|||||||
// issuer does not need to lock anything
|
// issuer does not need to lock anything
|
||||||
if (!isIssuer)
|
if (!isIssuer)
|
||||||
{
|
{
|
||||||
|
if (slep->getFieldAmount(sfBalance).issue() != amount.issue())
|
||||||
|
return temBAD_CURRENCY;
|
||||||
|
|
||||||
sleLine = ctx_.view().peek(keylet::line(
|
sleLine = ctx_.view().peek(keylet::line(
|
||||||
(*slep)[sfAccount], amount.getIssuer(), amount.getCurrency()));
|
(*slep)[sfAccount], amount.getIssuer(), amount.getCurrency()));
|
||||||
|
|
||||||
@@ -766,7 +769,7 @@ PayChanClaim::doApply()
|
|||||||
// no reason to do a dry run first
|
// no reason to do a dry run first
|
||||||
if (!ctx_.view().rules().enabled(featurePaychanAndEscrowForTokens))
|
if (!ctx_.view().rules().enabled(featurePaychanAndEscrowForTokens))
|
||||||
return temDISABLED;
|
return temDISABLED;
|
||||||
|
|
||||||
auto sleSrcAcc = ctx_.view().peek(keylet::account(src));
|
auto sleSrcAcc = ctx_.view().peek(keylet::account(src));
|
||||||
TER result = trustTransferLockedBalance(
|
TER result = trustTransferLockedBalance(
|
||||||
ctx_.view(),
|
ctx_.view(),
|
||||||
|
|||||||
Reference in New Issue
Block a user