Skip to content

Commit

Permalink
fix sfAmount field
Browse files Browse the repository at this point in the history
  • Loading branch information
tequdev committed Dec 5, 2023
1 parent f9e4cda commit e61e31f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ripple/app/tx/impl/NFTokenMint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ NFTokenMint::preflight(PreflightContext const& ctx)
return temDISABLED;

if (!ctx.rules.enabled(featureNFTokenMintOffer) &&
(ctx.tx[sfAmount] || ctx.tx[~sfDestination] || ctx.tx[~sfExpiration]))
(ctx.tx[~sfAmount] || ctx.tx[~sfDestination] || ctx.tx[~sfExpiration]))
return temDISABLED;

if (auto const ret = preflight1(ctx); !isTesSuccess(ret))
Expand Down Expand Up @@ -91,7 +91,7 @@ NFTokenMint::preflight(PreflightContext const& ctx)
return temMALFORMED;
}

if (STAmount const amount = ctx.tx[sfAmount])
if (STAmount const amount = ctx.tx[~sfAmount])
{
if (amount.negative() && ctx.rules.enabled(fixNFTokenNegOffer))
// An offer for a negative amount makes no sense.
Expand Down Expand Up @@ -173,7 +173,7 @@ NFTokenMint::preclaim(PreclaimContext const& ctx)
return tecNO_PERMISSION;
}

if (STAmount const amount = ctx.tx[sfAmount])
if (STAmount const amount = ctx.tx[~sfAmount])
{
if (hasExpired(ctx.view, ctx.tx[~sfExpiration]))
return tecEXPIRED;
Expand Down Expand Up @@ -374,7 +374,7 @@ NFTokenMint::doApply()
auto offer = std::make_shared<SLE>(offerID);
(*offer)[sfOwner] = account_;
(*offer)[sfNFTokenID] = nftokenID;
(*offer)[sfAmount] = ctx_.tx[sfAmount];
(*offer)[sfAmount] = ctx_.tx[~sfAmount];
(*offer)[sfFlags] = sleFlags;
(*offer)[sfOwnerNode] = *ownerNode;
(*offer)[sfNFTokenOfferNode] = *offerNode;
Expand Down

0 comments on commit e61e31f

Please sign in to comment.