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.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts
index eeff84be6..638dec8a6 100644
--- a/packages/taler-wallet-core/src/operations/refresh.ts
+++ b/packages/taler-wallet-core/src/operations/refresh.ts
@@ -850,6 +850,7 @@ export async function createRefreshGroup(
refreshGroups: typeof WalletStoresV1.refreshGroups;
coinAvailability: typeof WalletStoresV1.coinAvailability;
}>,
+ currency: string,
oldCoinPubs: CoinRefreshRequest[],
reason: RefreshReason,
): Promise<RefreshGroupId> {
@@ -934,6 +935,7 @@ export async function createRefreshGroup(
const refreshGroup: RefreshGroupRecord = {
operationStatus: RefreshOperationStatus.Pending,
+ currency,
timestampFinished: undefined,
statusPerCoin: oldCoinPubs.map(() => RefreshCoinStatus.Pending),
oldCoinPubs: oldCoinPubs.map((x) => x.coinPub),
@@ -1018,7 +1020,7 @@ export async function autoRefresh(
])
.runReadWrite(async (tx) => {
const exchange = await tx.exchanges.get(exchangeBaseUrl);
- if (!exchange) {
+ if (!exchange || !exchange.detailsPointer) {
return;
}
const coins = await tx.coins.indexes.byBaseUrl
@@ -1059,6 +1061,7 @@ export async function autoRefresh(
const res = await createRefreshGroup(
ws,
tx,
+ exchange.detailsPointer?.currency,
refreshCoins,
RefreshReason.Scheduled,
);