diff options
author | Florian Dold <florian@dold.me> | 2021-08-24 14:25:46 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-08-24 14:30:33 +0200 |
commit | 408d8e9fc896193fbcff1afd12aa04ab6d513798 (patch) | |
tree | a117a3c5d9130ea9b18c4198d3978f38dbd2f101 /packages/taler-wallet-core/src/operations/backup/import.ts | |
parent | 7553ae7c74bc04c268b77d010fb2f5b5eacad460 (diff) | |
download | wallet-core-408d8e9fc896193fbcff1afd12aa04ab6d513798.tar.xz |
towards handling frozen refreshes
Diffstat (limited to 'packages/taler-wallet-core/src/operations/backup/import.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/backup/import.ts | 7 |
1 files changed, 5 insertions, 2 deletions
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), |