aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/tip.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/tip.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/tip.ts22
1 files changed, 2 insertions, 20 deletions
diff --git a/packages/taler-wallet-core/src/operations/tip.ts b/packages/taler-wallet-core/src/operations/tip.ts
index da7673f35..9ca1ccb5a 100644
--- a/packages/taler-wallet-core/src/operations/tip.ts
+++ b/packages/taler-wallet-core/src/operations/tip.ts
@@ -205,23 +205,6 @@ export async function processTip(
);
}
-async function resetTipRetry(
- ws: InternalWalletState,
- tipId: string,
-): Promise<void> {
- await ws.db
- .mktx((x) => ({
- tips: x.tips,
- }))
- .runReadWrite(async (tx) => {
- const x = await tx.tips.get(tipId);
- if (x) {
- x.retryInfo = RetryInfo.reset();
- await tx.tips.put(x);
- }
- });
-}
-
async function processTipImpl(
ws: InternalWalletState,
walletTipId: string,
@@ -230,9 +213,8 @@ async function processTipImpl(
} = {},
): Promise<void> {
const forceNow = options.forceNow ?? false;
- if (forceNow) {
- await resetTipRetry(ws, walletTipId);
- }
+ await setupTipRetry(ws, walletTipId, { reset: forceNow });
+
const tipRecord = await ws.db
.mktx((x) => ({
tips: x.tips,