diff options
Diffstat (limited to 'packages/taler-wallet-core/src/withdraw.ts')
-rw-r--r-- | packages/taler-wallet-core/src/withdraw.ts | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts index 7ba69d2c1..930aa134b 100644 --- a/packages/taler-wallet-core/src/withdraw.ts +++ b/packages/taler-wallet-core/src/withdraw.ts @@ -824,12 +824,18 @@ async function processWithdrawalGroupDialogProposed( ); url.searchParams.set("old_state", "pending"); - url.searchParams.set("long_poll_ms", "30000"); - const resp = await ctx.wex.http.fetch(url.href, { - method: "GET", - cancellationToken: ctx.wex.cancellationToken, - }); + const res = await ctx.wex.ws.runLongpollQueueing( + url.hostname, + async (timeoutMs) => { + url.searchParams.set("long_poll_ms", `${timeoutMs}`); + + return await ctx.wex.http.fetch(url.href, { + method: "GET", + cancellationToken: ctx.wex.cancellationToken, + }); + }, + ); // If the bank claims that the withdrawal operation is already // pending, but we're still in DialogProposed, some other wallet |