forked from trent_larson/crowd-funder-for-time-pwa
IndexedDB migration: implement the migrations differently
This commit is contained in:
@@ -1021,12 +1021,12 @@ export async function importFromMnemonic(
|
||||
// Create new identifier
|
||||
const newId = newIdentifier(address, publicHex, privateHex, derivationPath);
|
||||
|
||||
// Handle database operations
|
||||
const accountsDB = await accountsDBPromise;
|
||||
// Handle erasures
|
||||
if (shouldErase) {
|
||||
const platformService = PlatformServiceFactory.getInstance();
|
||||
await platformService.dbExec("DELETE FROM accounts");
|
||||
if (USE_DEXIE_DB) {
|
||||
const accountsDB = await accountsDBPromise;
|
||||
await accountsDB.accounts.clear();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user