mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-24 21:15:58 +00:00
Fix password rearming.
This commit is contained in:
@@ -157,16 +157,10 @@ TER PaymentTransactor::doApply()
|
||||
mTxnAccount->setFieldAmount(sfBalance, saSrcXRPBalance - saDstAmount);
|
||||
|
||||
// re-arm the password change fee if we can and need to
|
||||
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);
|
||||
if ((sleDst->getFlags() & lsfPasswordSpent)
|
||||
sleDst->clearFlag(lsfPasswordSpent);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
sleDst->setFieldAmount(sfBalance, sleDst->getFieldAmount(sfBalance) + saDstAmount);
|
||||
}
|
||||
|
||||
terResult = tesSUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user