commit ef9c0fa56228e14cde2be839f48cefeda3db6428
parent aa1ea0b66c415dae71926bb9910b080a1676f61e
Author: Florian Dold <florian@dold.me>
Date: Sat, 18 Jul 2026 16:56:42 +0200
fix amount comparison in default choice computation
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/taler-wallet-core/src/pay-merchant.ts b/packages/taler-wallet-core/src/pay-merchant.ts
@@ -2661,7 +2661,7 @@ async function calculateDefaultChoice(
const details = choiceDetails[i];
if (
details.status === ChoiceSelectionDetailType.PaymentPossible &&
- choice.amount < cheapestPayableChoice.amount
+ Amounts.cmp(choice.amount, cheapestPayableChoice.amount) < 0
) {
cheapestPayableIndex = i;
cheapestPayableChoice = choice;