summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/recoup.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-02-19 18:20:43 +0100
committerFlorian Dold <florian@dold.me>2024-02-19 18:20:43 +0100
commite888d7f292f68a58fc4b56771fb8a38219d53b86 (patch)
tree54f2eab7c510cee5a2b90b6b2ccba94a437d8f91 /packages/taler-wallet-core/src/recoup.ts
parente951075d2ef52fa8e9e7489c62031777c3a7e66b (diff)
downloadwallet-core-e888d7f292f68a58fc4b56771fb8a38219d53b86.tar.gz
wallet-core-e888d7f292f68a58fc4b56771fb8a38219d53b86.tar.bz2
wallet-core-e888d7f292f68a58fc4b56771fb8a38219d53b86.zip
wallet-core: fix import paths, remove unused code, thread through cancellation tokens
Diffstat (limited to 'packages/taler-wallet-core/src/recoup.ts')
-rw-r--r--packages/taler-wallet-core/src/recoup.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/taler-wallet-core/src/recoup.ts b/packages/taler-wallet-core/src/recoup.ts
index a2ffa4132..02aa1e167 100644
--- a/packages/taler-wallet-core/src/recoup.ts
+++ b/packages/taler-wallet-core/src/recoup.ts
@@ -26,6 +26,7 @@
*/
import {
Amounts,
+ CancellationToken,
CoinStatus,
Logger,
RefreshReason,
@@ -40,6 +41,11 @@ import {
} from "@gnu-taler/taler-util";
import { readSuccessResponseJsonOrThrow } from "@gnu-taler/taler-util/http";
import {
+ TaskRunResult,
+ TransactionContext,
+ constructTaskIdentifier,
+} from "./common.js";
+import {
CoinRecord,
CoinSourceType,
RecoupGroupRecord,
@@ -53,14 +59,9 @@ import {
} from "./db.js";
import { InternalWalletState } from "./internal-wallet-state.js";
import { PendingTaskType } from "./pending-types.js";
-import { checkDbInvariant } from "./util/invariants.js";
-import {
- TaskRunResult,
- TransactionContext,
- constructTaskIdentifier,
-} from "./common.js";
import { createRefreshGroup } from "./refresh.js";
import { constructTransactionIdentifier } from "./transactions.js";
+import { checkDbInvariant } from "./util/invariants.js";
import { internalCreateWithdrawalGroup } from "./withdraw.js";
const logger = new Logger("operations/recoup.ts");
@@ -295,6 +296,7 @@ async function recoupRefreshCoin(
export async function processRecoupGroup(
ws: InternalWalletState,
recoupGroupId: string,
+ cancellationToken: CancellationToken,
): Promise<TaskRunResult> {
let recoupGroup = await ws.db.runReadOnlyTx(["recoupGroups"], async (tx) => {
return tx.recoupGroups.get(recoupGroupId);