more cleanup

This commit is contained in:
Mayukha Vadari
2026-07-02 16:39:42 -04:00
parent f37a7c49f6
commit 0a8e3c8b5c
5 changed files with 8 additions and 10 deletions

View File

@@ -51,7 +51,7 @@ findTokenAndPage(ApplyView& view, AccountID const& owner, uint256 const& nftoken
/** Insert the token in the owner's token directory. */
TER
insertToken(ApplyViewContext& view, AccountID owner, STObject&& nft);
insertToken(ApplyViewContext view, AccountID owner, STObject&& nft);
/** Remove the token from the owner's token directory. */
TER

View File

@@ -296,7 +296,7 @@ decreaseOwnerCount(
void
decreaseOwnerCountForObject(
ApplyView& view,
SLE::ref ownerSle,
SLE::ref accountSle,
SLE::ref objectSle,
std::uint32_t count,
beast::Journal j)
@@ -310,7 +310,7 @@ decreaseOwnerCountForObject(
if (!validObjectType)
return; // LCOV_EXCL_LINE
decreaseOwnerCount(view, ReserveContext::makeFromObject(view, objectSle, ownerSle), count, j);
decreaseOwnerCount(view, ReserveContext::makeFromObject(view, objectSle, accountSle), count, j);
}
XRPAmount
accountReserve(ReadView const& view, SLE::const_ref sle, beast::Journal j, Adjustment adj)

View File

@@ -97,8 +97,7 @@ deleteSLE(ApplyView& view, SLE::ref sleCredential, beast::Journal j)
}
if (isOwner)
decreaseOwnerCountForObject(
view, view.peek(keylet::account(account)), sleCredential, 1, j);
decreaseOwnerCountForObject(view, sleAccount, sleCredential, 1, j);
return tesSUCCESS;
};

View File

@@ -261,9 +261,8 @@ changeTokenURI(
/** Insert the token in the owner's token directory. */
TER
insertToken(ApplyViewContext& ctx, AccountID owner, STObject&& nft)
insertToken(ApplyViewContext ctx, AccountID owner, STObject&& nft)
{
auto& view = ctx.view;
XRPL_ASSERT(nft.isFieldPresent(sfNFTokenID), "xrpl::nft::insertToken : has NFT token");
// First, we need to locate the page the NFT belongs to, creating it
@@ -293,7 +292,7 @@ insertToken(ApplyViewContext& ctx, AccountID owner, STObject&& nft)
page->setFieldArray(sfNFTokens, arr);
}
view.update(page);
ctx.view.update(page);
return tesSUCCESS;
}

View File

@@ -581,7 +581,7 @@ addEmptyHolding(
{
return std::visit(
[&]<ValidIssueType TIss>(TIss const& issue) -> TER {
return addEmptyHolding(std::move(ctx), accountID, priorBalance, issue, journal);
return addEmptyHolding(ctx, accountID, priorBalance, issue, journal);
},
asset.value());
}
@@ -595,7 +595,7 @@ removeEmptyHolding(
{
return std::visit(
[&]<ValidIssueType TIss>(TIss const& issue) -> TER {
return removeEmptyHolding(std::move(ctx), accountID, issue, journal);
return removeEmptyHolding(ctx, accountID, issue, journal);
},
asset.value());
}