forked from jsnbuchanan/crowd-funder-for-time-pwa
add encryption & decryption for the sensitive identity & mnemonic in SQL DB
This commit is contained in:
@@ -109,9 +109,10 @@ import { Component, Vue } from "vue-facing-decorator";
|
||||
import { useClipboard } from "@vueuse/core";
|
||||
|
||||
import QuickNav from "../components/QuickNav.vue";
|
||||
import { NotificationIface } from "../constants/app";
|
||||
import { NotificationIface, USE_DEXIE_DB } from "../constants/app";
|
||||
import { retrieveSettingsForActiveAccount } from "../db/index";
|
||||
import { Account } from "../db/tables/accounts";
|
||||
import * as databaseUtil from "../db/databaseUtil";
|
||||
import {
|
||||
retrieveAccountCount,
|
||||
retrieveFullyDecryptedAccount,
|
||||
@@ -131,8 +132,14 @@ export default class SeedBackupView extends Vue {
|
||||
// 'created' hook runs when the Vue instance is first created
|
||||
async created() {
|
||||
try {
|
||||
const settings = await retrieveSettingsForActiveAccount();
|
||||
const activeDid = settings.activeDid || "";
|
||||
let activeDid = "";
|
||||
const settings = await databaseUtil.retrieveSettingsForActiveAccount();
|
||||
activeDid = settings.activeDid || "";
|
||||
|
||||
if (USE_DEXIE_DB) {
|
||||
const settings = await retrieveSettingsForActiveAccount();
|
||||
activeDid = settings.activeDid || "";
|
||||
}
|
||||
|
||||
this.numAccounts = await retrieveAccountCount();
|
||||
this.activeAccount = await retrieveFullyDecryptedAccount(activeDid);
|
||||
|
||||
Reference in New Issue
Block a user