From 408d8e9fc896193fbcff1afd12aa04ab6d513798 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 24 Aug 2021 14:25:46 +0200 Subject: towards handling frozen refreshes --- packages/taler-wallet-core/src/operations/pending.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'packages/taler-wallet-core/src/operations/pending.ts') diff --git a/packages/taler-wallet-core/src/operations/pending.ts b/packages/taler-wallet-core/src/operations/pending.ts index 200e6ccbd..a4ca972a7 100644 --- a/packages/taler-wallet-core/src/operations/pending.ts +++ b/packages/taler-wallet-core/src/operations/pending.ts @@ -27,6 +27,7 @@ import { AbortStatus, WalletStoresV1, BackupProviderStateTag, + RefreshCoinStatus, } from "../db.js"; import { PendingOperationsResponse, @@ -111,12 +112,17 @@ async function gatherRefreshPending( if (r.timestampFinished) { return; } + if (r.frozen) { + return; + } resp.pendingOperations.push({ type: PendingTaskType.Refresh, givesLifeness: true, timestampDue: r.retryInfo.nextRetry, refreshGroupId: r.refreshGroupId, - finishedPerCoin: r.finishedPerCoin, + finishedPerCoin: r.statusPerCoin.map( + (x) => x === RefreshCoinStatus.Finished, + ), retryInfo: r.retryInfo, }); }); -- cgit v1.2.3