forked from jsnbuchanan/crowd-funder-for-time-pwa
separate account from other data for backup/restore
This commit is contained in:
@@ -140,8 +140,8 @@ import { Options, Vue } from "vue-class-component";
|
||||
import { AppString } from "@/constants/app";
|
||||
import { accessToken, SimpleSigner } from "@/libs/crypto";
|
||||
import { IIdentifier } from "@veramo/core";
|
||||
import { db } from "../db";
|
||||
import { Contact } from "../db/tables";
|
||||
import { accountsDB, db } from "../db";
|
||||
import { Contact } from "../db/tables/contacts";
|
||||
|
||||
export interface GiveVerifiableCredential {
|
||||
"@context": string;
|
||||
@@ -169,9 +169,11 @@ export default class ContactsView extends Vue {
|
||||
|
||||
// 'created' hook runs when the Vue instance is first created
|
||||
async created() {
|
||||
await db.open();
|
||||
const accounts = await db.accounts.toArray();
|
||||
await accountsDB.open();
|
||||
const accounts = await accountsDB.accounts.toArray();
|
||||
this.identity = JSON.parse(accounts[0].identity);
|
||||
|
||||
await db.open();
|
||||
this.contacts = await db.contacts.toArray();
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
|
||||
Reference in New Issue
Block a user