taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 4c49969c58e84b0ea505487d475515b0e9e3f113
parent 03c694f43329d3ac1743bd02767822557d965873
Author: Florian Dold <florian@dold.me>
Date:   Tue, 10 Mar 2026 15:04:11 +0100

wallet-core: fetch exchange before and not after denom selection

Diffstat:
Mpackages/taler-wallet-core/src/withdraw.ts | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts @@ -3770,9 +3770,8 @@ async function getInitialDenomsSelection( if (forcedDenoms) { logger.warn("using forced denom selection"); return selectForcedWithdrawalDenominations(amount, denoms, forcedDenoms); - } else { - return selectWithdrawalDenominations(amount, denoms); } + return selectWithdrawalDenominations(amount, denoms); } export async function internalPrepareCreateWithdrawalGroup( @@ -3817,6 +3816,10 @@ export async function internalPrepareCreateWithdrawalGroup( withdrawalGroupId = encodeCrock(getRandomBytes(32)); } + if (exchangeBaseUrl !== undefined) { + await fetchFreshExchange(wex, exchangeBaseUrl); + } + let initialDenomSel: DenomSelectionState | undefined; if (amount !== undefined && exchangeBaseUrl !== undefined) { @@ -3849,10 +3852,6 @@ export async function internalPrepareCreateWithdrawalGroup( isForeignAccount: args.isForeignAccount, }; - if (exchangeBaseUrl !== undefined) { - await fetchFreshExchange(wex, exchangeBaseUrl); - } - const transactionId = constructTransactionIdentifier({ tag: TransactionType.Withdrawal, withdrawalGroupId: withdrawalGroup.withdrawalGroupId,