Skip to content

Commit

Permalink
add if check to return tecMPT_ISSUANCE_NOT_FOUND
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnxie999 committed Sep 9, 2024
1 parent 2a3e887 commit 3657fb2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/xrpld/ledger/detail/View.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,8 @@ rippleSend(
{
auto const mptID = keylet::mptIssuance(saAmount.issue().getMptID());
auto const sle = view.peek(mptID);
if (!sle)
return tecMPT_ISSUANCE_NOT_FOUND;

if (sle->getFieldU64(sfOutstandingAmount) + saAmount.value() >
(*sle)[~sfMaximumAmount].value_or(maxMPTokenAmount))
Expand Down

0 comments on commit 3657fb2

Please sign in to comment.