forked from jsnbuchanan/crowd-funder-for-time-pwa
IndexedDB migration: add ability to see mnemonic and download settings & contacts
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user