diff options
author | Florian Dold <florian@dold.me> | 2024-02-19 23:46:12 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-02-19 23:46:12 +0100 |
commit | e0c21a8694ba1f18b5940fc9ce776cd233610418 (patch) | |
tree | ed41296544892c9f4af93dbeeb5f2f13978bb0e8 /packages/taler-wallet-core | |
parent | a4d0ad4274c79803f75d53a3642cec163ccf4e53 (diff) | |
download | wallet-core-e0c21a8694ba1f18b5940fc9ce776cd233610418.tar.xz |
wallet-core: fix long-polling request parameter
Diffstat (limited to 'packages/taler-wallet-core')
-rw-r--r-- | packages/taler-wallet-core/src/withdraw.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts index 2e05f1221..3f4b3ef70 100644 --- a/packages/taler-wallet-core/src/withdraw.ts +++ b/packages/taler-wallet-core/src/withdraw.ts @@ -2262,17 +2262,25 @@ async function processReserveBankStatus( `withdrawal-operation/${uriResult.withdrawalOperationId}`, uriResult.bankIntegrationApiBaseUrl, ); - url.searchParams.set("timeout_ms", "30000"); + url.searchParams.set("long_poll_ms", "30000"); + logger.info(`long-polling for withdrawal operation at ${url.href}`); const statusResp = await ws.http.fetch(url.href, { timeout: getReserveRequestTimeout(withdrawalGroup), }); + logger.info( + `long-polling for withdrawal operation returned status ${statusResp.status}`, + ); const status = await readSuccessResponseJsonOrThrow( statusResp, codecForWithdrawOperationStatusResponse(), ); + if (logger.shouldLogTrace()) { + logger.trace(`response body: ${j2s(status)}`); + } + if (status.aborted) { return transitionBankAborted(ctx); } |