taler-typescript-core

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

commit 46d3a19f22e23317d8a960a523d53f7e7c1995f6
parent 432eb56b26cbb15792a617ac0b7d8b9550506335
Author: Florian Dold <florian@dold.me>
Date:   Sat, 18 Jul 2026 16:36:46 +0200

wallet-core: fix logic for re-doing denom selection and forcing /keys fetch

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

diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts @@ -2182,13 +2182,13 @@ async function processQueryReserve( for (const sd of withdrawalGroup.denomsSel.selectedDenoms) { numActiveDenoms += sd.count - (sd.skip ?? 0); } - const selectionBad = numActiveDenoms > 0; + const redoSelection = amountChanged || numActiveDenoms === 0; - if (amountChanged || selectionBad) { + if (redoSelection) { // If we change the denom selection, make sure we have // fresh info about the exchange. await fetchFreshExchange(wex, withdrawalGroup.exchangeBaseUrl, { - forceUpdate: selectionBad, + forceUpdate: redoSelection, }); await updateWithdrawalDenomsForExchange( wex, @@ -2214,7 +2214,7 @@ async function processQueryReserve( if (lastOrigin != null && !externalConfirmation) { await storeKnownBankAccount(tx, currency, lastOrigin); } - if (amountChanged) { + if (redoSelection) { const planchetKeys = await tx.planchets.indexes.byGroup.getAllKeys( wg.withdrawalGroupId, );