diff options
author | Florian Dold <florian@dold.me> | 2023-12-11 20:01:28 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-12-12 15:42:34 +0100 |
commit | e31f18b8f129adb9cbe33158297a9cff56a7143e (patch) | |
tree | fc960e069a08ca1924a79c154f5ced26db709348 /packages/taler-wallet-core/src/operations/refresh.ts | |
parent | 055645e17aa9424f299aa04f686de7574ab437c7 (diff) | |
download | wallet-core-e31f18b8f129adb9cbe33158297a9cff56a7143e.tar.xz |
wallet-core: towards better DD48 support
Diffstat (limited to 'packages/taler-wallet-core/src/operations/refresh.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/refresh.ts | 12 |
1 files changed, 7 insertions, 5 deletions
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(), |