diff options
author | Florian Dold <florian@dold.me> | 2021-07-12 15:55:31 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-07-12 15:55:31 +0200 |
commit | 1c0cce3f5812cd2796ab9693b47f035427ca5340 (patch) | |
tree | d79c4953dd3947fb89c954df1daebfff1f734669 /packages/taler-wallet-core | |
parent | 2667d741e92e82d3cea9512f7c0a7ae8c0b09f80 (diff) | |
download | wallet-core-1c0cce3f5812cd2796ab9693b47f035427ca5340.tar.xz |
tolerate zero-value payments
Diffstat (limited to 'packages/taler-wallet-core')
-rw-r--r-- | packages/taler-wallet-core/src/operations/pay.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay.ts b/packages/taler-wallet-core/src/operations/pay.ts index 33d3bc83c..fed61428c 100644 --- a/packages/taler-wallet-core/src/operations/pay.ts +++ b/packages/taler-wallet-core/src/operations/pay.ts @@ -145,7 +145,8 @@ export async function getTotalPaymentCost( costs.push(pcs.coinContributions[i]); costs.push(refreshCost); } - return Amounts.sum(costs).amount; + const zero = Amounts.getZero(pcs.paymentAmount.currency); + return Amounts.sum([zero, ...costs]).amount; }); } |