diff options
Diffstat (limited to 'packages/taler-wallet-core/src/pay-merchant.ts')
-rw-r--r-- | packages/taler-wallet-core/src/pay-merchant.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/packages/taler-wallet-core/src/pay-merchant.ts b/packages/taler-wallet-core/src/pay-merchant.ts index b5d2670ad..9e3b37c51 100644 --- a/packages/taler-wallet-core/src/pay-merchant.ts +++ b/packages/taler-wallet-core/src/pay-merchant.ts @@ -3028,12 +3028,17 @@ async function processPurchaseAutoRefund( download.contractData.contractTermsHash, ); - requestUrl.searchParams.set("timeout_ms", "10000"); requestUrl.searchParams.set("refund", Amounts.stringify(totalKnownRefund)); - const resp = await wex.http.fetch(requestUrl.href, { - cancellationToken: wex.cancellationToken, - }); + const resp = await wex.ws.runLongpollQueueing( + requestUrl.hostname, + async (timeoutMs) => { + requestUrl.searchParams.set("timeout_ms", `${timeoutMs}`); + return await wex.http.fetch(requestUrl.href, { + cancellationToken: wex.cancellationToken, + }); + }, + ); // FIXME: Check other status codes! |