summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/withdraw.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/withdraw.ts')
-rw-r--r--packages/taler-wallet-core/src/withdraw.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts
index 68ff9d494..7ec62a46b 100644
--- a/packages/taler-wallet-core/src/withdraw.ts
+++ b/packages/taler-wallet-core/src/withdraw.ts
@@ -54,6 +54,7 @@ import {
LibtoolVersion,
Logger,
NotificationType,
+ ObservabilityEventType,
TalerBankIntegrationHttpClient,
TalerError,
TalerErrorCode,
@@ -3167,12 +3168,25 @@ export async function getWithdrawalDetailsForAmount(
if (clientCancelKey) {
const prevCts = wex.ws.clientCancellationMap.get(clientCancelKey);
if (prevCts) {
+ wex.oc.observe({
+ type: ObservabilityEventType.Message,
+ contents: `Cancelling previous key ${clientCancelKey}`,
+ });
prevCts.cancel();
+ } else {
+ wex.oc.observe({
+ type: ObservabilityEventType.Message,
+ contents: `No previous key ${clientCancelKey}`,
+ });
}
+ wex.oc.observe({
+ type: ObservabilityEventType.Message,
+ contents: `Setting clientCancelKey ${clientCancelKey} to ${cts}`,
+ });
wex.ws.clientCancellationMap.set(clientCancelKey, cts);
}
try {
- return internalGetWithdrawalDetailsForAmount(wex, req);
+ return await internalGetWithdrawalDetailsForAmount(wex, req);
} finally {
if (clientCancelKey && !cts.token.isCancelled) {
wex.ws.clientCancellationMap.delete(clientCancelKey);