commit 4a0c6a5e45cb017733c9f5cb64b49edd09e9ce2d
parent 1c55dd0696445b26d3fb5908284a576de5c37390
Author: Florian Dold <dold@taler.net>
Date: Wed, 22 Jul 2026 00:29:32 +0200
wallet: compare currencies, not amounts, for paivana overrides
Amounts.isSameCurrency expects currency names, but it was handed whole
amount strings, so it only held when the two amounts were identical and
the override never took effect.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/packages/taler-wallet-core/src/pay-template.ts b/packages/taler-wallet-core/src/pay-template.ts
@@ -89,7 +89,10 @@ export function applyTemplateUriOverrides(
// Use the amount from the URI to override simple choices
// without fancy inputs.
if (
- Amounts.isSameCurrency(c.amount, parsedUri.amount) &&
+ Amounts.isSameCurrency(
+ Amounts.currencyOf(c.amount),
+ Amounts.currencyOf(parsedUri.amount),
+ ) &&
(c.inputs == null || c.inputs.length == 0)
) {
c.amount = parsedUri.amount;