diff options
author | Florian Dold <florian@dold.me> | 2023-12-18 23:26:20 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-12-18 23:26:20 +0100 |
commit | 2db6888c511117a980a04159117c9e9db38e1c05 (patch) | |
tree | a5e6ed553317474a527fe42a3aaa2ecbd1a25d19 /packages | |
parent | f22f5f89cc99fb0556b956b6432e4817d52378d2 (diff) | |
download | wallet-core-2db6888c511117a980a04159117c9e9db38e1c05.tar.xz |
wallet-core: do not crash for payments with zero coins
Diffstat (limited to 'packages')
-rw-r--r-- | packages/taler-wallet-core/src/operations/pay-merchant.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-merchant.ts b/packages/taler-wallet-core/src/operations/pay-merchant.ts index 078f0faf9..fb8a6d898 100644 --- a/packages/taler-wallet-core/src/operations/pay-merchant.ts +++ b/packages/taler-wallet-core/src/operations/pay-merchant.ts @@ -152,7 +152,7 @@ export async function getTotalPaymentCost( ws: InternalWalletState, pcs: PayCoinSelection, ): Promise<AmountJson> { - const currency = Amounts.currencyOf(pcs.coinContributions[0]); + const currency = Amounts.currencyOf(pcs.paymentAmount); return ws.db .mktx((x) => [x.coins, x.denominations]) .runReadOnly(async (tx) => { |