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.ts18
1 files changed, 8 insertions, 10 deletions
diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts
index e3c4e66a2..853a5e0df 100644
--- a/packages/taler-wallet-core/src/withdraw.ts
+++ b/packages/taler-wallet-core/src/withdraw.ts
@@ -1922,22 +1922,20 @@ export async function getWithdrawalDetailsForUri(
info.apiBaseUrl,
wex.http,
);
- console.log(
- `waiting operation (${info.operationId}) to change from pending`,
- );
+
bankApi
.getWithdrawalOperationById(info.operationId, {
old_state: "pending",
timeoutMs: opts.notifyChangeFromPendingTimeoutMs,
})
.then((resp) => {
- console.log(
- `operation (${info.operationId}) to change to ${JSON.stringify(
- resp,
- undefined,
- 2,
- )}`,
- );
+ if (resp.type === "ok" && resp.body.status !== "pending") {
+ wex.ws.notify({
+ type: NotificationType.WithdrawalOperationTransition,
+ uri: talerWithdrawUri,
+ });
+ }
+ }).finally(() => {
ongoingChecks[talerWithdrawUri] = false;
});
}