diff options
author | Florian Dold <florian@dold.me> | 2022-04-14 23:06:35 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-04-14 23:06:49 +0200 |
commit | 098d1eb7ebfcd2d4b460758772d42367a61dc5b2 (patch) | |
tree | fec7a92408405cd6e514409b8af04b41e974b5e6 | |
parent | a2e8ab944576f1ef62e316727f69038fa99d78eb (diff) | |
download | wallet-core-098d1eb7ebfcd2d4b460758772d42367a61dc5b2.tar.xz |
wallet-core: request reserve status with long poll timeout
-rw-r--r-- | packages/taler-wallet-core/src/operations/reserves.ts | 5 |
1 files changed, 4 insertions, 1 deletions
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), }, |