diff options
author | Florian Dold <florian@dold.me> | 2023-06-30 16:14:58 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-06-30 16:14:58 +0200 |
commit | d4ee96138774e8bc469f172bbb6276af89d6f240 (patch) | |
tree | eda5bc6833306727f711cc5aedd5f307fa8b1f67 /packages/taler-wallet-core/src/operations/recoup.ts | |
parent | 7523ffa9105f71a6a4c201d3ee46dbfccc929cea (diff) | |
download | wallet-core-d4ee96138774e8bc469f172bbb6276af89d6f240.tar.xz |
wallet-core: rename OperationAttempt->TaskRun, do not allow task result values anymore
Diffstat (limited to 'packages/taler-wallet-core/src/operations/recoup.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/recoup.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/taler-wallet-core/src/operations/recoup.ts b/packages/taler-wallet-core/src/operations/recoup.ts index 056aa83b8..c8c766d1b 100644 --- a/packages/taler-wallet-core/src/operations/recoup.ts +++ b/packages/taler-wallet-core/src/operations/recoup.ts @@ -55,7 +55,7 @@ import { checkDbInvariant } from "../util/invariants.js"; import { GetReadWriteAccess } from "../util/query.js"; import { createRefreshGroup, processRefreshGroup } from "./refresh.js"; import { internalCreateWithdrawalGroup } from "./withdraw.js"; -import { OperationAttemptResult } from "./common.js"; +import { TaskRunResult } from "./common.js"; const logger = new Logger("operations/recoup.ts"); @@ -289,18 +289,18 @@ async function recoupRefreshCoin( export async function processRecoupGroup( ws: InternalWalletState, recoupGroupId: string, -): Promise<OperationAttemptResult> { +): Promise<TaskRunResult> { let recoupGroup = await ws.db .mktx((x) => [x.recoupGroups]) .runReadOnly(async (tx) => { return tx.recoupGroups.get(recoupGroupId); }); if (!recoupGroup) { - return OperationAttemptResult.finishedEmpty(); + return TaskRunResult.finished(); } if (recoupGroup.timestampFinished) { logger.trace("recoup group finished"); - return OperationAttemptResult.finishedEmpty(); + return TaskRunResult.finished(); } const ps = recoupGroup.coinPubs.map(async (x, i) => { try { @@ -318,12 +318,12 @@ export async function processRecoupGroup( return tx.recoupGroups.get(recoupGroupId); }); if (!recoupGroup) { - return OperationAttemptResult.finishedEmpty(); + return TaskRunResult.finished(); } for (const b of recoupGroup.recoupFinishedPerCoin) { if (!b) { - return OperationAttemptResult.finishedEmpty(); + return TaskRunResult.finished(); } } @@ -408,7 +408,7 @@ export async function processRecoupGroup( } await tx.recoupGroups.put(rg2); }); - return OperationAttemptResult.finishedEmpty(); + return TaskRunResult.finished(); } export async function createRecoupGroup( |