aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pay-merchant.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-merchant.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pay-merchant.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-merchant.ts b/packages/taler-wallet-core/src/operations/pay-merchant.ts
index 14d80d17a..2a89c59ed 100644
--- a/packages/taler-wallet-core/src/operations/pay-merchant.ts
+++ b/packages/taler-wallet-core/src/operations/pay-merchant.ts
@@ -2415,6 +2415,13 @@ async function acceptRefunds(
p.purchaseStatus = PurchaseStatus.Paid;
}
logger.trace("refund query done");
+ ws.notify({
+ type: NotificationType.RefundFinished,
+ transactionId: makeTransactionId(
+ TransactionType.Payment,
+ p.proposalId,
+ ),
+ });
} else {
// No error, but we need to try again!
p.timestampLastRefundStatus = now;
@@ -2426,6 +2433,7 @@ async function acceptRefunds(
ws.notify({
type: NotificationType.RefundQueried,
+ transactionId: makeTransactionId(TransactionType.Payment, proposalId),
});
}
@@ -2694,6 +2702,13 @@ export async function processPurchaseQueryRefund(
await tx.purchases.put(purchase);
});
+ // No new refunds, but we still need to notify
+ // the wallet client that the query finished.
+ ws.notify({
+ type: NotificationType.RefundQueried,
+ transactionId: makeTransactionId(TransactionType.Payment, proposalId),
+ });
+
return OperationAttemptResult.finishedEmpty();
}
}