Skip to content

Commit

Permalink
Resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatcam committed Nov 12, 2024
1 parent 8d4ca5f commit f8c333b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/xrpld/app/tx/detail/AMMClawback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ AMMClawback::preflight(PreflightContext const& ctx)
}

std::optional<STAmount> const clawAmount = ctx.tx[~sfAmount];
auto const asset = ctx.tx[sfAsset];
auto const asset = ctx.tx[sfAsset].get<Issue>();

if (isXRP(asset))
return temMALFORMED;
Expand All @@ -68,7 +68,7 @@ AMMClawback::preflight(PreflightContext const& ctx)
return temMALFORMED;
}

if (clawAmount && clawAmount->issue() != asset)
if (clawAmount && clawAmount->get<Issue>() != asset)
{
JLOG(ctx.j.trace()) << "AMMClawback: Amount's issuer/currency subfield "
"does not match Asset field";
Expand All @@ -84,8 +84,8 @@ AMMClawback::preflight(PreflightContext const& ctx)
TER
AMMClawback::preclaim(PreclaimContext const& ctx)
{
auto const asset = ctx.tx[sfAsset];
auto const asset2 = ctx.tx[sfAsset2];
auto const asset = ctx.tx[sfAsset].get<Issue>();
auto const asset2 = ctx.tx[sfAsset2].get<Issue>();
auto const sleIssuer = ctx.view.read(keylet::account(ctx.tx[sfAccount]));
if (!sleIssuer)
return terNO_ACCOUNT; // LCOV_EXCL_LINE
Expand Down Expand Up @@ -138,8 +138,8 @@ AMMClawback::applyGuts(Sandbox& sb)
std::optional<STAmount> const clawAmount = ctx_.tx[~sfAmount];
AccountID const issuer = ctx_.tx[sfAccount];
AccountID const holder = ctx_.tx[sfHolder];
Issue const asset = ctx_.tx[sfAsset];
Issue const asset2 = ctx_.tx[sfAsset2];
Issue const asset = ctx_.tx[sfAsset].get<Issue>();
Issue const asset2 = ctx_.tx[sfAsset2].get<Issue>();

auto ammSle = sb.peek(keylet::amm(asset, asset2));
if (!ammSle)
Expand Down
4 changes: 2 additions & 2 deletions src/xrpld/app/tx/detail/AMMDeposit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ AMMDeposit::preclaim(PreclaimContext const& ctx)
return tesSUCCESS;
};

if (auto const ter = checkAsset(ctx.tx[sfAsset]))
if (auto const ter = checkAsset(ctx.tx[sfAsset].get<Issue>()))
return ter;

if (auto const ter = checkAsset(ctx.tx[sfAsset2]))
if (auto const ter = checkAsset(ctx.tx[sfAsset2].get<Issue>()))
return ter;
}

Expand Down
7 changes: 6 additions & 1 deletion src/xrpld/app/tx/detail/AMMWithdraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,12 @@ AMMWithdraw::applyGuts(Sandbox& sb)
return {result, false};

auto const res = deleteAMMAccountIfEmpty(
sb, ammSle, newLPTokenBalance, ctx_.tx[sfAsset], ctx_.tx[sfAsset2], j_);
sb,
ammSle,
newLPTokenBalance,
ctx_.tx[sfAsset].get<Issue>(),
ctx_.tx[sfAsset2].get<Issue>(),
j_);
// LCOV_EXCL_START
if (!res.second)
return {res.first, false};
Expand Down

0 comments on commit f8c333b

Please sign in to comment.