This commit is contained in:
Richard Holland
2023-09-29 12:21:53 +00:00
parent d9f2401713
commit 9841c8da72

View File

@@ -334,7 +334,9 @@ URIToken::doApply()
STAmount const reserve{
view().fees().accountReserve(sle->getFieldU32(sfOwnerCount) + 1)};
if (mPriorBalance - ctx_.tx.getFieldAmount(sfFee).xrp() < reserve)
STAmount const afterFee = mPriorBalance - ctx_.tx.getFieldAmount(sfFee).xrp();
if (afterFee > mPriorBalance || afterFee < reserve)
return tecINSUFFICIENT_RESERVE;
}