commit 23e40c74dfba6c22fb7a59ef3fa0d8901fc56981
parent 2e2482c01062e3edc40e4cafd2fea85d08f38995
Author: Florian Dold <florian@dold.me>
Date: Thu, 16 Jul 2026 16:03:38 +0200
wallet-core: fix retries in initial part of getExchangeTos
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/packages/taler-wallet-core/src/exchanges.ts b/packages/taler-wallet-core/src/exchanges.ts
@@ -1257,6 +1257,14 @@ export async function fetchFreshExchange(
): Promise<ReadyExchangeSummary> {
logger.trace(`fetch fresh ${baseUrl} forced ${options.forceUpdate}`);
+ if (options.progressContext != null && !options.noBail) {
+ // If there is a progress context, we usually want to keep
+ // retrying and not bail out early.
+ logger.warn(
+ "fetchFreshExchange: progressContext specified but request can bail",
+ );
+ }
+
const startRes = await startUpdateExchangeEntry(wex, baseUrl, {
forceUpdate: options.forceUpdate,
});
@@ -2732,6 +2740,7 @@ export async function getExchangeTos(
}
const exch = await fetchFreshExchange(wex, exchangeBaseUrl, {
progressContext,
+ noBail: progressContext != null,
});
if (progressContext) {