taler-typescript-core

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

commit 222b64411f78faef290ce905235fd6d2502993fe
parent e47836718d6540aa1fc6a2f5bfbfd3d5136a1505
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri, 30 Oct 2026 10:27:52 +0100

check for withdraw period expiration, all the time

Diffstat:
Mpackages/taler-wallet-core/src/exchanges.ts | 22++++++++++++++++++++++
1 file changed, 22 insertions(+), 0 deletions(-)

diff --git a/packages/taler-wallet-core/src/exchanges.ts b/packages/taler-wallet-core/src/exchanges.ts @@ -2155,6 +2155,28 @@ export async function waitReadyExchange( // FIXME: Emit progress notification here. return false; } + // A key set whose withdraw period has lapsed + // leaves the entry in state "ready" until the + // update task gets around to noticing. Reporting "ready" in that + // window hands the caller an exchange it cannot withdraw from, and a + // withdrawal started right after a travel then fails with + // "no denominations could be selected". checkExchangeEntryOutdated() + // checks, so ask it here rather than trusting the stored status. + const noUsableDenoms = await wex.runWalletDbTx((tx) => + checkExchangeEntryOutdated( + wex, + tx, + exchangeBaseUrl, + exchange.detailsPointer?.masterPublicKey, + ), + ); + if (noUsableDenoms) { + logger.info( + `exchange ${exchange.baseUrl} has no withdrawable denominations,` + + ` waiting for a fresh key set`, + ); + return false; + } } if (!exchangeDetails) {