diff options
author | Florian Dold <florian@dold.me> | 2022-09-21 12:40:02 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-09-21 12:40:11 +0200 |
commit | 28b4489bead6cd88db1b91e0e0ae8b8e0d1d0007 (patch) | |
tree | 2ffbe9d0b63aef8cc91cba28f4c65dd1b5a94a02 /packages/taler-wallet-core/src/wallet.ts | |
parent | 859991a40c4a7757d874f9ae6e6db7b76145a3c3 (diff) | |
download | wallet-core-28b4489bead6cd88db1b91e0e0ae8b8e0d1d0007.tar.xz |
wallet-core: make basic backup work again
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 2e362da6e..c91a96841 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -221,7 +221,7 @@ import { HttpRequestLibrary, readSuccessResponseJsonOrThrow, } from "./util/http.js"; -import { checkDbInvariant } from "./util/invariants.js"; +import { checkDbInvariant, checkLogicInvariant } from "./util/invariants.js"; import { AsyncCondition, OpenedPromise, @@ -812,6 +812,7 @@ export async function makeCoinAvailable( }>, coinRecord: CoinRecord, ): Promise<void> { + checkLogicInvariant(coinRecord.status === CoinStatus.Fresh); const existingCoin = await tx.coins.get(coinRecord.coinPub); if (existingCoin) { return; |