IndexedDB migration: add ability to see mnemonic and download settings & contacts

This commit is contained in:
2025-06-19 12:37:41 -06:00
parent 6d93e86a2b
commit f310ca42e8
2 changed files with 143 additions and 46 deletions

View File

@@ -21,6 +21,8 @@
* @since 2024
*/
import "dexie-export-import";
import { PlatformServiceFactory } from "./PlatformServiceFactory";
import { db, accountsDBPromise } from "../db/index";
import { Contact, ContactMethod } from "../db/tables/contacts";
@@ -108,6 +110,12 @@ export interface MigrationResult {
warnings: string[];
}
export async function getDexieExportBlob(): Promise<Blob> {
await db.open();
const blob = db.export({ prettyJson: true });
return blob;
}
/**
* Retrieves all contacts from the Dexie (IndexedDB) database
*