From 20d429cd7bff6091856e578a709a63a5d6b96c44 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Mon, 17 Dec 2012 18:27:02 -0800 Subject: [PATCH] Fix password rearming. --- src/cpp/ripple/PaymentTransactor.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/cpp/ripple/PaymentTransactor.cpp b/src/cpp/ripple/PaymentTransactor.cpp index 7facfa92cf..a7350c263a 100644 --- a/src/cpp/ripple/PaymentTransactor.cpp +++ b/src/cpp/ripple/PaymentTransactor.cpp @@ -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); - } + + sleDst->setFieldAmount(sfBalance, sleDst->getFieldAmount(sfBalance) + saDstAmount); terResult = tesSUCCESS; }