forked from trent_larson/crowd-funder-for-time-pwa
separate account from other data for backup/restore
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user