commit 6ea2da4bdffade9a9404f071c68f16546b38fc09
parent 5ab3e5ab92b7e2d24656315133b03cd739d423c9
Author: Florian Dold <dold@taler.net>
Date: Wed, 22 Jul 2026 10:40:52 +0200
wallet: treat an exactly sufficient material balance as sufficient
The hint for an insufficient balance reported the material balance as too low
when it equalled the instructed amount, hiding the more precise hint about
fees that are not covered.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/taler-wallet-core/src/coinSelection.ts b/packages/taler-wallet-core/src/coinSelection.ts
@@ -484,7 +484,7 @@ function getHint(
const isMerchant = !!req.wireMethod;
- if (Amounts.cmp(exchDet.balanceMaterial, req.instructedAmount) <= 0) {
+ if (Amounts.cmp(exchDet.balanceMaterial, req.instructedAmount) < 0) {
return InsufficientBalanceHint.WalletBalanceMaterialInsufficient;
} else if (
Amounts.cmp(exchDet.balanceAgeAcceptable, req.instructedAmount) < 0