summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/recoup.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-08-20 16:27:20 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-08-20 16:27:20 +0530
commit421e613f92b80c81c856d6b074aa160e80e38e3d (patch)
tree7284e8b856986de3ee4ca1362fa9b52ce1e22de1 /packages/taler-wallet-core/src/operations/recoup.ts
parentddf9171c5becb3bb1aebdd3e1a298644f62ed090 (diff)
downloadwallet-core-421e613f92b80c81c856d6b074aa160e80e38e3d.tar.gz
wallet-core-421e613f92b80c81c856d6b074aa160e80e38e3d.tar.bz2
wallet-core-421e613f92b80c81c856d6b074aa160e80e38e3d.zip
throttling diagnostics and request timeouts
Diffstat (limited to 'packages/taler-wallet-core/src/operations/recoup.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/recoup.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/operations/recoup.ts b/packages/taler-wallet-core/src/operations/recoup.ts
index f855a28cb..ba02f72f8 100644
--- a/packages/taler-wallet-core/src/operations/recoup.ts
+++ b/packages/taler-wallet-core/src/operations/recoup.ts
@@ -40,7 +40,7 @@ import {
import { codecForRecoupConfirmation } from "../types/talerTypes";
import { NotificationType } from "../types/notifications";
-import { forceQueryReserve } from "./reserves";
+import { forceQueryReserve, getReserveRequestTimeout } from "./reserves";
import { Amounts } from "../util/amounts";
import { createRefreshGroup, processRefreshGroup } from "./refresh";
@@ -154,7 +154,9 @@ async function recoupWithdrawCoin(
const recoupRequest = await ws.cryptoApi.createRecoupRequest(coin);
const reqUrl = new URL(`/coins/${coin.coinPub}/recoup`, coin.exchangeBaseUrl);
- const resp = await ws.http.postJson(reqUrl.href, recoupRequest);
+ const resp = await ws.http.postJson(reqUrl.href, recoupRequest, {
+ timeout: getReserveRequestTimeout(reserve),
+ });
const recoupConfirmation = await readSuccessResponseJsonOrThrow(
resp,
codecForRecoupConfirmation(),