mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
fix disalllow XRP bug
This commit is contained in:
@@ -297,7 +297,7 @@ EscrowCreate::doApply()
|
||||
// Obeying the lsfDissalowXRP flag was a bug. Piggyback on
|
||||
// featureDepositAuth to remove the bug.
|
||||
if (!ctx_.view().rules().enabled(featureDepositAuth) &&
|
||||
((*sled)[sfFlags] & lsfDisallowXRP))
|
||||
isXRP(amount) && ((*sled)[sfFlags] & lsfDisallowXRP))
|
||||
return tecNO_TARGET;
|
||||
}
|
||||
|
||||
|
||||
@@ -340,7 +340,7 @@ PayChanCreate::preclaim(PreclaimContext const& ctx)
|
||||
// Obeying the lsfDisallowXRP flag was a bug. Piggyback on
|
||||
// featureDepositAuth to remove the bug.
|
||||
if (!ctx.view.rules().enabled(featureDepositAuth) &&
|
||||
((*sled)[sfFlags] & lsfDisallowXRP))
|
||||
isXRP(amount) && ((*sled)[sfFlags] & lsfDisallowXRP))
|
||||
return tecNO_TARGET;
|
||||
}
|
||||
|
||||
@@ -741,9 +741,7 @@ PayChanClaim::doApply()
|
||||
// Obeying the lsfDisallowXRP flag was a bug. Piggyback on
|
||||
// featureDepositAuth to remove the bug.
|
||||
bool const depositAuth{ctx_.view().rules().enabled(featureDepositAuth)};
|
||||
if (!depositAuth &&
|
||||
// RH TODO: does this condition need to be changed for IOU paychans?
|
||||
(txAccount == src && (sled->getFlags() & lsfDisallowXRP)))
|
||||
if (!depositAuth && chanBalance.native() && (txAccount == src && (sled->getFlags() & lsfDisallowXRP)))
|
||||
return tecNO_TARGET;
|
||||
|
||||
// Check whether the destination account requires deposit authorization.
|
||||
|
||||
Reference in New Issue
Block a user