summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/backup/index.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-10-12 22:27:50 +0200
committerFlorian Dold <florian@dold.me>2022-10-12 22:27:50 +0200
commitded00b680a776d03cd8c928354c87c0be8690f56 (patch)
tree2608e9c7ba1ce8bfb105a421c56cdc201a78f3c9 /packages/taler-wallet-core/src/operations/backup/index.ts
parent3da1e82a245851c384c22293c928fcef1c4c2f34 (diff)
downloadwallet-core-ded00b680a776d03cd8c928354c87c0be8690f56.tar.gz
wallet-core-ded00b680a776d03cd8c928354c87c0be8690f56.tar.bz2
wallet-core-ded00b680a776d03cd8c928354c87c0be8690f56.zip
wallet-core: implement enabling/disabling dev mode
Diffstat (limited to 'packages/taler-wallet-core/src/operations/backup/index.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/backup/index.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/operations/backup/index.ts b/packages/taler-wallet-core/src/operations/backup/index.ts
index 3d3ebf04a..8e5e69097 100644
--- a/packages/taler-wallet-core/src/operations/backup/index.ts
+++ b/packages/taler-wallet-core/src/operations/backup/index.ts
@@ -74,8 +74,8 @@ import {
BackupProviderStateTag,
BackupProviderTerms,
ConfigRecord,
+ ConfigRecordKey,
WalletBackupConfState,
- WALLET_BACKUP_STATE_KEY,
} from "../../db.js";
import { InternalWalletState } from "../../internal-wallet-state.js";
import {
@@ -861,10 +861,12 @@ async function backupRecoveryTheirs(
.mktx((x) => [x.config, x.backupProviders])
.runReadWrite(async (tx) => {
let backupStateEntry: ConfigRecord | undefined = await tx.config.get(
- WALLET_BACKUP_STATE_KEY,
+ ConfigRecordKey.WalletBackupState,
);
checkDbInvariant(!!backupStateEntry);
- checkDbInvariant(backupStateEntry.key === WALLET_BACKUP_STATE_KEY);
+ checkDbInvariant(
+ backupStateEntry.key === ConfigRecordKey.WalletBackupState,
+ );
backupStateEntry.value.lastBackupNonce = undefined;
backupStateEntry.value.lastBackupTimestamp = undefined;
backupStateEntry.value.lastBackupCheckTimestamp = undefined;