wallet-core: request reserve status with long poll timeout

This commit is contained in:
Florian Dold 2022-04-14 23:06:35 +02:00
parent a2e8ab9445
commit 098d1eb7eb
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -539,8 +539,11 @@ async function updateReserve(
return { ready: true }; return { ready: true };
} }
const reserveUrl = new URL(`reserves/${reservePub}`, reserve.exchangeBaseUrl);
reserveUrl.searchParams.set("timeout_ms", "200");
const resp = await ws.http.get( const resp = await ws.http.get(
new URL(`reserves/${reservePub}`, reserve.exchangeBaseUrl).href, reserveUrl.href,
{ {
timeout: getReserveRequestTimeout(reserve), timeout: getReserveRequestTimeout(reserve),
}, },