fix: Fix IOU precision issues in LoanBrokerCover transactions (#7274)

This commit is contained in:
Vito Tumas
2026-05-21 16:51:58 +02:00
committed by GitHub
parent 795dc5e364
commit 7fdaa0a5ef
10 changed files with 546 additions and 11 deletions

View File

@@ -1738,4 +1738,9 @@ divRoundStrict(STAmount const& num, STAmount const& den, Asset const& asset, boo
return divRoundImpl<NumberRoundModeGuard>(num, den, asset, roundUp);
}
[[nodiscard]] bool
STAmount::isZeroAtScale(int scale) const
{
return roundToScale(*this, scale, Number::RoundingMode::ToNearest).signum() == 0;
}
} // namespace xrpl