aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/refresh.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/refresh.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/refresh.ts12
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(),