aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-08-07 18:19:04 +0200
committerFlorian Dold <florian@dold.me>2021-08-07 18:19:04 +0200
commitfb0f8043ea55421bd6c845ce4d69788ed7524a03 (patch)
treeb2670c08045f04cfc410e6e454d6179b93d59f19
parentf40593185ab56cf1df240a70615a8374a87e708a (diff)
reset deposit lastError
-rw-r--r--packages/taler-wallet-core/src/db.ts2
-rw-r--r--packages/taler-wallet-core/src/operations/deposits.ts2
-rw-r--r--packages/taler-wallet-core/src/pending-types.ts2
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;
}