From 098d1eb7ebfcd2d4b460758772d42367a61dc5b2 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 14 Apr 2022 23:06:35 +0200 Subject: [PATCH] wallet-core: request reserve status with long poll timeout --- packages/taler-wallet-core/src/operations/reserves.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/taler-wallet-core/src/operations/reserves.ts b/packages/taler-wallet-core/src/operations/reserves.ts index 91c19fbf0..8d8912130 100644 --- a/packages/taler-wallet-core/src/operations/reserves.ts +++ b/packages/taler-wallet-core/src/operations/reserves.ts @@ -539,8 +539,11 @@ async function updateReserve( return { ready: true }; } + const reserveUrl = new URL(`reserves/${reservePub}`, reserve.exchangeBaseUrl); + reserveUrl.searchParams.set("timeout_ms", "200"); + const resp = await ws.http.get( - new URL(`reserves/${reservePub}`, reserve.exchangeBaseUrl).href, + reserveUrl.href, { timeout: getReserveRequestTimeout(reserve), },