From 408d8e9fc896193fbcff1afd12aa04ab6d513798 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 24 Aug 2021 14:25:46 +0200 Subject: towards handling frozen refreshes --- packages/taler-wallet-core/src/operations/backup/import.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'packages/taler-wallet-core/src/operations/backup/import.ts') diff --git a/packages/taler-wallet-core/src/operations/backup/import.ts b/packages/taler-wallet-core/src/operations/backup/import.ts index 8ba4e4db3..a694d9f4d 100644 --- a/packages/taler-wallet-core/src/operations/backup/import.ts +++ b/packages/taler-wallet-core/src/operations/backup/import.ts @@ -45,6 +45,7 @@ import { RefreshSessionRecord, WireInfo, WalletStoresV1, + RefreshCoinStatus, } from "../../db.js"; import { PayCoinSelection } from "../../util/coinSelection.js"; import { j2s } from "@gnu-taler/taler-util"; @@ -831,8 +832,10 @@ export async function importBackup( lastError: undefined, lastErrorPerCoin: {}, oldCoinPubs: backupRefreshGroup.old_coins.map((x) => x.coin_pub), - finishedPerCoin: backupRefreshGroup.old_coins.map( - (x) => x.finished, + statusPerCoin: backupRefreshGroup.old_coins.map((x) => + x.finished + ? RefreshCoinStatus.Finished + : RefreshCoinStatus.Pending, ), inputPerCoin: backupRefreshGroup.old_coins.map((x) => Amounts.parseOrThrow(x.input_amount), -- cgit v1.2.3