From fb0f8043ea55421bd6c845ce4d69788ed7524a03 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sat, 7 Aug 2021 18:19:04 +0200 Subject: [PATCH] reset deposit lastError --- packages/taler-wallet-core/src/db.ts | 2 +- packages/taler-wallet-core/src/operations/deposits.ts | 2 ++ packages/taler-wallet-core/src/pending-types.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index 0bb8db17a..437d2e7bd 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -1685,7 +1685,7 @@ export interface DepositGroupRecord { /** * Retry info. */ - retryInfo: RetryInfo; + retryInfo?: RetryInfo; } /** diff --git a/packages/taler-wallet-core/src/operations/deposits.ts b/packages/taler-wallet-core/src/operations/deposits.ts index 179c0b13b..c6c80ce9f 100644 --- a/packages/taler-wallet-core/src/operations/deposits.ts +++ b/packages/taler-wallet-core/src/operations/deposits.ts @@ -255,6 +255,8 @@ async function processDepositGroupImpl( } if (allDeposited) { dg.timestampFinished = getTimestampNow(); + delete dg.lastError; + delete dg.retryInfo; await tx.depositGroups.put(dg); } }); diff --git a/packages/taler-wallet-core/src/pending-types.ts b/packages/taler-wallet-core/src/pending-types.ts index 505220e72..5033163a1 100644 --- a/packages/taler-wallet-core/src/pending-types.ts +++ b/packages/taler-wallet-core/src/pending-types.ts @@ -209,7 +209,7 @@ export interface PendingWithdrawTask { export interface PendingDepositTask { type: PendingTaskType.Deposit; lastError: TalerErrorDetails | undefined; - retryInfo: RetryInfo; + retryInfo: RetryInfo | undefined; depositGroupId: string; }