mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-24 23:50:22 +00:00
more cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user