Skip to content

Commit 4c9a96a

Browse files
committed
Review feedback from @gregtatcam
- No need to subtract takeFromSender in rippleSendMultiMPT if the sender is the issuer.
1 parent b824818 commit 4c9a96a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/libxrpl/ledger/View.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2621,12 +2621,16 @@ rippleSendMultiMPT(
26212621
// not exceed MaximumAmount
26222622
if (senderID == issuer)
26232623
{
2624+
XRPL_ASSERT_PARTS(
2625+
takeFromSender == beast::zero,
2626+
"rippler::rippleSendMultiMPT",
2627+
"sender == issuer, takeFromSender == zero");
26242628
auto const sendAmount = amount.mpt().value();
26252629
auto const maximumAmount =
26262630
sle->at(~sfMaximumAmount).value_or(maxMPTokenAmount);
2627-
if (sendAmount > maximumAmount - takeFromSender ||
2631+
if (sendAmount > maximumAmount ||
26282632
sle->getFieldU64(sfOutstandingAmount) >
2629-
maximumAmount - sendAmount - takeFromSender)
2633+
maximumAmount - sendAmount)
26302634
return tecPATH_DRY;
26312635
}
26322636

0 commit comments

Comments
 (0)