forked from trent_larson/crowd-funder-for-time-pwa
modify the settings to allow account-specific settings, eg. for "isRegistered"
This commit is contained in:
@@ -112,9 +112,8 @@ import { Router } from "vue-router";
|
||||
|
||||
import QuickNav from "@/components/QuickNav.vue";
|
||||
import { NotificationIface } from "@/constants/app";
|
||||
import { accountsDB, db } from "@/db/index";
|
||||
import { accountsDB, db, retrieveSettingsForActiveAccount } from "@/db/index";
|
||||
import { Contact } from "@/db/tables/contacts";
|
||||
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
|
||||
import {
|
||||
AgreeVerifiableCredential,
|
||||
createEndorserJwtVcFromClaim,
|
||||
@@ -144,13 +143,12 @@ export default class ContactAmountssView extends Vue {
|
||||
|
||||
async created() {
|
||||
try {
|
||||
await db.open();
|
||||
const contactDid = (this.$route as Router).query["contactDid"] as string;
|
||||
this.contact = (await db.contacts.get(contactDid)) || null;
|
||||
|
||||
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
||||
this.activeDid = (settings?.activeDid as string) || "";
|
||||
this.apiServer = (settings?.apiServer as string) || "";
|
||||
const settings = await retrieveSettingsForActiveAccount();
|
||||
this.activeDid = settings?.activeDid || "";
|
||||
this.apiServer = settings?.apiServer || "";
|
||||
|
||||
if (this.activeDid && this.contact) {
|
||||
this.loadGives(this.activeDid, this.contact);
|
||||
|
||||
Reference in New Issue
Block a user