summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-04-09 18:43:30 +0200
committerFlorian Dold <florian@dold.me>2024-04-09 18:43:38 +0200
commit3ed118e5320df907287b3bd0d7aadda5b4e7913f (patch)
tree7a5d9634b70025175e9e7f6c8753574fb621785f
parent4527e33d7beec4fbb8f1a40ee5ce8d1fd2451a35 (diff)
downloadwallet-core-3ed118e5320df907287b3bd0d7aadda5b4e7913f.tar.gz
wallet-core-3ed118e5320df907287b3bd0d7aadda5b4e7913f.tar.bz2
wallet-core-3ed118e5320df907287b3bd0d7aadda5b4e7913f.zip
wallet-core: extra cancellation points
-rw-r--r--packages/taler-wallet-core/src/withdraw.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts
index a16a03054..ecd654edf 100644
--- a/packages/taler-wallet-core/src/withdraw.ts
+++ b/packages/taler-wallet-core/src/withdraw.ts
@@ -1937,6 +1937,8 @@ export async function getExchangeWithdrawalInfo(
cancellationToken: wex.cancellationToken,
});
+ wex.cancellationToken.throwIfCancelled();
+
if (exchange.currency != instructedAmount.currency) {
// Specifying the amount in the conversion input currency is not yet supported.
// We might add support for it later.
@@ -1957,12 +1959,17 @@ export async function getExchangeWithdrawalInfo(
logger.trace("updating withdrawal denoms");
await updateWithdrawalDenoms(wex, exchangeBaseUrl);
+ wex.cancellationToken.throwIfCancelled();
+
logger.trace("getting candidate denoms");
const candidateDenoms = await getCandidateWithdrawalDenoms(
wex,
exchangeBaseUrl,
instructedAmount.currency,
);
+
+ wex.cancellationToken.throwIfCancelled();
+
logger.trace("selecting withdrawal denoms");
// FIXME: Why not in a transaction?
const selectedDenoms = selectWithdrawalDenominations(