aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pending.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pending.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pending.ts11
1 files changed, 2 insertions, 9 deletions
diff --git a/packages/taler-wallet-core/src/operations/pending.ts b/packages/taler-wallet-core/src/operations/pending.ts
index 99d275836..b2f13625a 100644
--- a/packages/taler-wallet-core/src/operations/pending.ts
+++ b/packages/taler-wallet-core/src/operations/pending.ts
@@ -51,25 +51,18 @@ async function gatherExchangePending(
resp: PendingOperationsResponse,
): Promise<void> {
await tx.exchanges.iter().forEachAsync(async (e) => {
- let exchangeUpdateTimestampDue: Timestamp;
-
- if (e.lastError) {
- exchangeUpdateTimestampDue = e.retryInfo.nextRetry;
- } else {
- exchangeUpdateTimestampDue = e.nextUpdate;
- }
resp.pendingOperations.push({
type: PendingTaskType.ExchangeUpdate,
givesLifeness: false,
- timestampDue: exchangeUpdateTimestampDue,
+ timestampDue: e.lastError ? e.retryInfo.nextRetry : e.nextUpdate,
exchangeBaseUrl: e.baseUrl,
lastError: e.lastError,
});
resp.pendingOperations.push({
type: PendingTaskType.ExchangeCheckRefresh,
- timestampDue: e.nextRefreshCheck,
+ timestampDue: e.lastError ? e.retryInfo.nextRetry : e.nextRefreshCheck,
givesLifeness: false,
exchangeBaseUrl: e.baseUrl,
});