summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/db.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-08-30 18:33:56 +0200
committerFlorian Dold <florian@dold.me>2023-08-30 18:33:56 +0200
commit8fed5b4b7370431602c0b25f8142009e61f7b906 (patch)
tree3f188e815eb56e9d69ef1ef7fe6da663a8d8e2e5 /packages/taler-wallet-core/src/db.ts
parenta713d90c3c564408309d92223d383ecc9225924f (diff)
downloadwallet-core-8fed5b4b7370431602c0b25f8142009e61f7b906.tar.gz
wallet-core-8fed5b4b7370431602c0b25f8142009e61f7b906.tar.bz2
wallet-core-8fed5b4b7370431602c0b25f8142009e61f7b906.zip
wallet-core: allow version change event
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r--packages/taler-wallet-core/src/db.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts
index 1255e8c71..a642c0203 100644
--- a/packages/taler-wallet-core/src/db.ts
+++ b/packages/taler-wallet-core/src/db.ts
@@ -114,6 +114,11 @@ export const TALER_WALLET_MAIN_DB_NAME = "taler-wallet-main-v9";
*/
export const TALER_WALLET_META_DB_NAME = "taler-wallet-meta";
+/**
+ * Stored backups, mainly created when manually importing a backup.
+ */
+export const TALER_WALLET_STORED_BACKUPS_DB_NAME = "taler-wallet-stored-backups";
+
export const CURRENT_DB_CONFIG_KEY = "currentMainDbName";
/**
@@ -2773,15 +2778,10 @@ export interface StoredBackupMeta {
name: string;
}
-export interface StoredBackupData {
- name: string;
- data: any;
-}
-
export const StoredBackupStores = {
backupMeta: describeStore(
"backupMeta",
- describeContents<MetaConfigRecord>({ keyPath: "name" }),
+ describeContents<StoredBackupMeta>({ keyPath: "name" }),
{},
),
backupData: describeStore("backupData", describeContents<any>({}), {}),
@@ -3250,7 +3250,7 @@ export async function openStoredBackupsDatabase(
): Promise<DbAccess<typeof StoredBackupStores>> {
const backupsDbHandle = await openDatabase(
idbFactory,
- TALER_WALLET_META_DB_NAME,
+ TALER_WALLET_STORED_BACKUPS_DB_NAME,
1,
() => {},
onStoredBackupsDbUpgradeNeeded,