aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/recoup.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-03-08 20:39:52 +0100
committerFlorian Dold <florian@dold.me>2022-03-08 20:39:56 +0100
commitd5a933e4cb685aab3e5e6bae5ca2358291e59130 (patch)
tree852e85a8d056fc80bd370c5ac89c5fd7354d0251 /packages/taler-wallet-core/src/operations/recoup.ts
parent1d1c847b793620acf3a2b193ab45eabf53234cb2 (diff)
downloadwallet-core-d5a933e4cb685aab3e5e6bae5ca2358291e59130.tar.xz
wallet-core: handle reserve retries better
We now always increment the next retry timeout before doing anything else, so that it is impossible to accidentally retry immediately. This fixes a bug where we previously made many, very frequent requests to the bank integration API.
Diffstat (limited to 'packages/taler-wallet-core/src/operations/recoup.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/recoup.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/operations/recoup.ts b/packages/taler-wallet-core/src/operations/recoup.ts
index 9ae045cfa..afca923bd 100644
--- a/packages/taler-wallet-core/src/operations/recoup.ts
+++ b/packages/taler-wallet-core/src/operations/recoup.ts
@@ -233,7 +233,7 @@ async function recoupWithdrawCoin(
updatedCoin.status = CoinStatus.Dormant;
const currency = updatedCoin.currentAmount.currency;
updatedCoin.currentAmount = Amounts.getZero(currency);
- updatedReserve.reserveStatus = ReserveRecordStatus.QUERYING_STATUS;
+ updatedReserve.reserveStatus = ReserveRecordStatus.QueryingStatus;
updatedReserve.retryInfo = initRetryInfo();
updatedReserve.operationStatus = OperationStatus.Pending;
await tx.coins.put(updatedCoin);