separate account from other data for backup/restore

This commit is contained in:
2023-03-19 16:25:19 -06:00
parent fb44c8aa48
commit 45b54db01e
14 changed files with 99 additions and 95 deletions

View File

@@ -45,7 +45,7 @@
<script lang="ts">
import { Options, Vue } from "vue-class-component";
import { deriveAddress, newIdentifier } from "../libs/crypto";
import { db } from "@/db";
import { accountsDB } from "@/db";
@Options({
components: {},
@@ -75,10 +75,10 @@ export default class ImportAccountView extends Vue {
);
try {
await db.open();
const num_accounts = await db.accounts.count();
await accountsDB.open();
const num_accounts = await accountsDB.accounts.count();
if (num_accounts === 0) {
await db.accounts.add({
await accountsDB.accounts.add({
dateCreated: new Date().toISOString(),
derivationPath: this.derivationPath,
identity: JSON.stringify(newId),