From e31f18b8f129adb9cbe33158297a9cff56a7143e Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 11 Dec 2023 20:01:28 +0100 Subject: wallet-core: towards better DD48 support --- packages/taler-wallet-core/src/operations/refresh.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'packages/taler-wallet-core/src/operations/refresh.ts') diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts index 3afdd2d71..51dd9adac 100644 --- a/packages/taler-wallet-core/src/operations/refresh.ts +++ b/packages/taler-wallet-core/src/operations/refresh.ts @@ -98,7 +98,11 @@ import { TaskRunResult, TaskRunResultType, } from "./common.js"; -import { updateExchangeFromUrl } from "./exchanges.js"; +import { + fetchFreshExchange, + startUpdateExchangeEntry, + waitExchangeEntryUpdated, +} from "./exchanges.js"; import { constructTransactionIdentifier, notifyTransition, @@ -221,7 +225,7 @@ async function provideRefreshSession( const { refreshGroup, coin } = d; - const { exchange } = await updateExchangeFromUrl(ws, coin.exchangeBaseUrl); + const { exchange } = await fetchFreshExchange(ws, coin.exchangeBaseUrl); if (!exchange) { throw Error("db inconsistent: exchange of coin not found"); } @@ -1157,9 +1161,7 @@ export async function autoRefresh( // We must make sure that the exchange is up-to-date so that // can refresh into new denominations. - await updateExchangeFromUrl(ws, exchangeBaseUrl, { - forceNow: true, - }); + await fetchFreshExchange(ws, exchangeBaseUrl); let minCheckThreshold = AbsoluteTime.addDuration( AbsoluteTime.now(), -- cgit v1.2.3