commit 0f14b5b8588c1108a2e1909a951274c7da678872
parent 0624533db0378f450a9f9a7393961bf20ade02e7
Author: Florian Dold <florian@dold.me>
Date: Tue, 21 Jul 2026 10:29:21 +0200
wallet-core: remove usages of old runWithClientCancellation
Diffstat:
2 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/packages/taler-wallet-core/src/pay-peer-pull-credit.ts b/packages/taler-wallet-core/src/pay-peer-pull-credit.ts
@@ -61,20 +61,20 @@ import {
genericWaitForStateVal,
getGenericRecordHandle,
requireExchangeTosAcceptedOrThrow,
- runWithClientCancellation,
reservePaytoFromExchange,
} from "./common.js";
import {
PeerPullPaymentCreditStatus,
+ WalletOperationRetry,
WalletPeerPullCredit,
+ WalletWithdrawalGroup,
WithdrawalGroupStatus,
+ WithdrawalRecordType,
timestampPreciseFromDb,
timestampPreciseToDb,
- WalletOperationRetry,
- WalletWithdrawalGroup,
- WithdrawalRecordType,
} from "./db-common.js";
import {} from "./db-indexeddb.js";
+import { WalletDbTransaction } from "./dbtx.js";
import {
BalanceThresholdCheckResult,
checkIncomingAmountLegalUnderKycBalanceThreshold,
@@ -90,6 +90,7 @@ import {
runKycCheckAlgo,
} from "./kyc.js";
import { getMergeReserveInfo, isPurseDeposited } from "./pay-peer-common.js";
+import { runWithMaybeProgressContext } from "./progress.js";
import {
constructTransactionIdentifier,
isUnsuccessfulTransaction,
@@ -101,7 +102,6 @@ import {
internalCreateWithdrawalGroup,
waitWithdrawalFinal,
} from "./withdraw.js";
-import { WalletDbTransaction } from "./dbtx.js";
const logger = new Logger("pay-peer-pull-credit.ts");
@@ -1056,10 +1056,10 @@ export async function checkPeerPullCredit(
wex: WalletExecutionContext,
req: CheckPeerPullCreditRequest,
): Promise<CheckPeerPullCreditResponse> {
- return runWithClientCancellation(
+ return runWithMaybeProgressContext(
wex,
"checkPeerPullCredit",
- req.clientCancellationId,
+ req.progressToken,
async () => internalCheckPeerPullCredit(wex, req),
);
}
diff --git a/packages/taler-wallet-core/src/pay-peer-push-debit.ts b/packages/taler-wallet-core/src/pay-peer-push-debit.ts
@@ -70,19 +70,18 @@ import {
TransactionContext,
constructTaskIdentifier,
getGenericRecordHandle,
- runWithClientCancellation,
spendCoins,
} from "./common.js";
import { EncryptContractRequest } from "./crypto/cryptoTypes.js";
import {
PeerPushDebitStatus,
+ WalletPeerPushDebit,
timestampPreciseFromDb,
timestampPreciseToDb,
timestampProtocolFromDb,
timestampProtocolToDb,
- WalletPeerPushDebit,
} from "./db-common.js";
-import { WalletIndexedDbTransaction } from "./db-indexeddb.js";
+import { WalletDbTransaction } from "./dbtx.js";
import {
fetchFreshExchange,
getExchangeDetailsInTx,
@@ -95,6 +94,7 @@ import {
isPurseMerged,
queryCoinInfosForSelection,
} from "./pay-peer-common.js";
+import { runWithMaybeProgressContext } from "./progress.js";
import { createRefreshGroup } from "./refresh.js";
import {
constructTransactionIdentifier,
@@ -102,7 +102,6 @@ import {
} from "./transactions.js";
import { WalletExecutionContext, walletExchangeClient } from "./wallet.js";
import { updateWithdrawalDenomsForCurrency } from "./withdraw.js";
-import { WalletDbTransaction } from "./dbtx.js";
const logger = new Logger("pay-peer-push-debit.ts");
@@ -409,10 +408,10 @@ export async function checkPeerPushDebitV2(
wex: WalletExecutionContext,
req: CheckPeerPushDebitRequest,
): Promise<CheckPeerPushDebitResponse> {
- return runWithClientCancellation(
+ return runWithMaybeProgressContext(
wex,
"checkPeerPushDebit",
- req.clientCancellationId,
+ req.progressToken,
() => internalCheckPeerPushDebit(wex, req),
);
}