diff options
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r-- | packages/taler-wallet-core/src/pay-merchant.ts | 6 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/withdraw.ts | 18 |
2 files changed, 10 insertions, 14 deletions
diff --git a/packages/taler-wallet-core/src/pay-merchant.ts b/packages/taler-wallet-core/src/pay-merchant.ts index c5af25307..a3623e6d2 100644 --- a/packages/taler-wallet-core/src/pay-merchant.ts +++ b/packages/taler-wallet-core/src/pay-merchant.ts @@ -617,8 +617,7 @@ async function processDownloadProposal( if (proposal.purchaseStatus != PurchaseStatus.PendingDownloadingProposal) { logger.error( - `unexpected state ${proposal.purchaseStatus}/${ - PurchaseStatus[proposal.purchaseStatus] + `unexpected state ${proposal.purchaseStatus}/${PurchaseStatus[proposal.purchaseStatus] } for ${ctx.transactionId} in processDownloadProposal`, ); return TaskRunResult.finished(); @@ -874,8 +873,7 @@ async function createOrReusePurchase( oldProposal.claimToken === claimToken ) { logger.info( - `Found old proposal (status=${ - PurchaseStatus[oldProposal.purchaseStatus] + `Found old proposal (status=${PurchaseStatus[oldProposal.purchaseStatus] }) for order ${orderId} at ${merchantBaseUrl}`, ); if (oldProposal.purchaseStatus === PurchaseStatus.DialogShared) { 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; }); } |