Skip to content

Commit

Permalink
Rename argument to getAmounts() lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatcam committed May 9, 2024
1 parent 1c97fa0 commit 199912a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ripple/app/misc/AMMHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@ getAMMOfferStartWithTakerGets(
if (nTakerGetsConstraint < *nTakerGets)
nTakerGets = nTakerGetsConstraint;

auto getAmounts = [&pool, &tfee](Number const& nTakerGets_) {
auto getAmounts = [&pool, &tfee](Number const& nTakerGetsProposed) {
// Round downward to minimize the offer and to maximize the quality.
// This has the most impact when takerGets is XRP.
auto const takerGets =
toAmount<TOut>(getIssue(pool.out), nTakerGets_, Number::downward);
auto const takerGets = toAmount<TOut>(
getIssue(pool.out), nTakerGetsProposed, Number::downward);
return TAmounts<TIn, TOut>{
swapAssetOut(pool, takerGets, tfee), takerGets};
};
Expand Down Expand Up @@ -293,11 +293,11 @@ getAMMOfferStartWithTakerPays(
if (nTakerPaysConstraint < *nTakerPays)
nTakerPays = nTakerPaysConstraint;

auto getAmounts = [&pool, &tfee](Number const& nTakerPays_) {
auto getAmounts = [&pool, &tfee](Number const& nTakerPaysProposed) {
// Round downward to minimize the offer and to maximize the quality.
// This has the most impact when takerPays is XRP.
auto const takerPays =
toAmount<TIn>(getIssue(pool.in), nTakerPays_, Number::downward);
auto const takerPays = toAmount<TIn>(
getIssue(pool.in), nTakerPaysProposed, Number::downward);
return TAmounts<TIn, TOut>{
takerPays, swapAssetIn(pool, takerPays, tfee)};
};
Expand Down

0 comments on commit 199912a

Please sign in to comment.