Make a few tweaks to the changes in 43fe49e7

- This was the first merge after I got back from sabbatical. I made
  these same changes in "ximinez/lending-XLS-66" commit 9d052dc, but
  after seeing some test failures, I think they belong here.
This commit is contained in:
Ed Hennis
2025-07-11 17:06:26 -04:00
parent 10f7e4a02a
commit 1897ac5ee7
2 changed files with 5 additions and 3 deletions

View File

@@ -218,7 +218,9 @@ Env::balance(Account const& account, MPTIssue const& mptIssue) const
if (!sle)
return {STAmount(mptIssue, 0), account.name()};
STAmount const amount{mptIssue, sle->getFieldU64(sfOutstandingAmount)};
// Make it negative
STAmount const amount{
mptIssue, sle->getFieldU64(sfOutstandingAmount), 0, true};
return {amount, lookup(issuer).name()};
}
else

View File

@@ -81,8 +81,8 @@ constexpr HashRouterFlags SF_CF_VALID = HashRouterFlags::PRIVATE6;
TxConsequences
EscrowCreate::makeTxConsequences(PreflightContext const& ctx)
{
return TxConsequences{
ctx.tx, isXRP(ctx.tx[sfAmount]) ? ctx.tx[sfAmount].xrp() : beast::zero};
auto const amount = ctx.tx[sfAmount];
return TxConsequences{ctx.tx, isXRP(amount) ? amount.xrp() : beast::zero};
}
template <ValidIssueType T>