aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pay-merchant.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-01-12 17:04:33 +0100
committerFlorian Dold <florian@dold.me>2023-01-12 17:04:33 +0100
commit473cbc3908d6f18511fed14fb45af18f3cd1ee32 (patch)
tree2992daa6324f4f0f53fa047fafcf53ca1978a42f /packages/taler-wallet-core/src/operations/pay-merchant.ts
parent1e378e4499906e466e933e40464727fb1c1cbf5e (diff)
downloadwallet-core-473cbc3908d6f18511fed14fb45af18f3cd1ee32.tar.xz
wallet-core: refresh properly after non-abort refunds
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-merchant.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pay-merchant.ts6
1 files changed, 5 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 0360f7395..cb17f16eb 100644
--- a/packages/taler-wallet-core/src/operations/pay-merchant.ts
+++ b/packages/taler-wallet-core/src/operations/pay-merchant.ts
@@ -2376,7 +2376,11 @@ async function acceptRefunds(
}
}
- if (reason === RefundReason.AbortRefund) {
+ if (reason !== RefundReason.AbortRefund) {
+ // For abort-refunds, the refresh group has already been
+ // created before the refund was started.
+ // For other refunds, we need to create it after we know
+ // the amounts.
const refreshCoinsPubs = Object.values(refreshCoinsMap);
logger.info(`refreshCoinMap ${j2s(refreshCoinsMap)}`);
if (refreshCoinsPubs.length > 0) {