mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 05:55:51 +00:00
Fix password rearming.
This commit is contained in:
@@ -157,16 +157,10 @@ TER PaymentTransactor::doApply()
|
|||||||
mTxnAccount->setFieldAmount(sfBalance, saSrcXRPBalance - saDstAmount);
|
mTxnAccount->setFieldAmount(sfBalance, saSrcXRPBalance - saDstAmount);
|
||||||
|
|
||||||
// re-arm the password change fee if we can and need to
|
// re-arm the password change fee if we can and need to
|
||||||
if ( (sleDst->getFlags() & lsfPasswordSpent) &&
|
if ((sleDst->getFlags() & lsfPasswordSpent)
|
||||||
(saDstAmount > theConfig.FEE_DEFAULT) ) // FIXME: Can't access FEE_DEFAULT here
|
|
||||||
{ // FIXME: The line below is disastrous, it leaks XRP
|
|
||||||
sleDst->setFieldAmount(sfBalance, sleDst->getFieldAmount(sfBalance) + saDstAmount-theConfig.FEE_DEFAULT);
|
|
||||||
sleDst->clearFlag(lsfPasswordSpent);
|
sleDst->clearFlag(lsfPasswordSpent);
|
||||||
}
|
|
||||||
else
|
sleDst->setFieldAmount(sfBalance, sleDst->getFieldAmount(sfBalance) + saDstAmount);
|
||||||
{
|
|
||||||
sleDst->setFieldAmount(sfBalance, sleDst->getFieldAmount(sfBalance) + saDstAmount);
|
|
||||||
}
|
|
||||||
|
|
||||||
terResult = tesSUCCESS;
|
terResult = tesSUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user