forked from jsnbuchanan/crowd-funder-for-time-pwa
Stil fixing database writes
This commit is contained in:
@@ -171,7 +171,8 @@ import { useAppStore } from "../store/app";
|
||||
import { useAccountStore } from "../store/account";
|
||||
import { createIdentifier, deriveAddress, newIdentifier } from "../libs/crypto";
|
||||
import { IIdentifier } from "@veramo/core";
|
||||
import R from "ramda";
|
||||
import * as R from "ramda";
|
||||
import { db } from "../libs/db";
|
||||
|
||||
@Options({
|
||||
components: {},
|
||||
@@ -219,6 +220,18 @@ export default class AccountViewView extends Vue {
|
||||
privateHex,
|
||||
UPORT_ROOT_DERIVATION_PATH
|
||||
);
|
||||
console.log(newId);
|
||||
db.open();
|
||||
db.accounts.add({
|
||||
did: address,
|
||||
kid: newId.keys[0].kid,
|
||||
kms: newId.keys[0].kms,
|
||||
meta: "",
|
||||
privateKeyHex: privateHex,
|
||||
publicKeyHex: publicHex,
|
||||
type: "Secp256k1",
|
||||
});
|
||||
db.close();
|
||||
//appStore.dispatch(appSlice.actions.addLog({log: false, msg: "... created new ID..."}))
|
||||
accountStore.account = JSON.stringify(newId);
|
||||
//appStore.dispatch(appSlice.actions.addLog({log: false, msg: "... stored new ID..."}))
|
||||
|
||||
Reference in New Issue
Block a user