diff --git a/src/App.vue b/src/App.vue index 35457383..13052500 100644 --- a/src/App.vue +++ b/src/App.vue @@ -386,7 +386,7 @@ export default class App extends Vue { let allGoingOff = false; try { - const settings: Settings = await this.$settings(); + const settings: Settings = await this.$accountSettings(); const notifyingNewActivity = !!settings?.notifyingNewActivityTime; const notifyingReminder = !!settings?.notifyingReminderTime; diff --git a/src/components/GiftedDialog.vue b/src/components/GiftedDialog.vue index d91e68b3..2b9f6602 100644 --- a/src/components/GiftedDialog.vue +++ b/src/components/GiftedDialog.vue @@ -219,9 +219,13 @@ export default class GiftedDialog extends Vue { this.stepType = "giver"; try { - const settings = await this.$settings(); + const settings = await this.$accountSettings(); this.apiServer = settings.apiServer || ""; this.activeDid = settings.activeDid || ""; + logger.info("[GiftedDialog] Settings received:", { + activeDid: this.activeDid, + apiServer: this.apiServer, + }); this.allContacts = await this.$contacts(); diff --git a/src/components/UserNameDialog.vue b/src/components/UserNameDialog.vue index d71ee9fc..285d11c2 100644 --- a/src/components/UserNameDialog.vue +++ b/src/components/UserNameDialog.vue @@ -84,7 +84,7 @@ export default class UserNameDialog extends Vue { */ async open(aCallback?: (name?: string) => void) { this.callback = aCallback || this.callback; - const settings = await this.$settings(); + const settings = await this.$accountSettings(); this.givenName = settings.firstName || ""; this.visible = true; } diff --git a/src/views/ClaimReportCertificateView.vue b/src/views/ClaimReportCertificateView.vue index dbbae98d..228b1fa2 100644 --- a/src/views/ClaimReportCertificateView.vue +++ b/src/views/ClaimReportCertificateView.vue @@ -53,7 +53,7 @@ export default class ClaimReportCertificateView extends Vue { // Initialize notification helper this.notify = createNotifyHelpers(this.$notify); - const settings = await this.$settings(); + const settings = await this.$accountSettings(); this.activeDid = settings.activeDid || ""; this.apiServer = settings.apiServer || ""; const pathParams = window.location.pathname.substring( diff --git a/src/views/IdentitySwitcherView.vue b/src/views/IdentitySwitcherView.vue index 4de52280..20e96add 100644 --- a/src/views/IdentitySwitcherView.vue +++ b/src/views/IdentitySwitcherView.vue @@ -222,8 +222,8 @@ export default class IdentitySwitcherView extends Vue { } async switchAccount(did?: string) { - // Save the new active DID to master settings - await this.$saveSettings({ activeDid: did }); + // Update the active DID in the active_identity table + await this.$updateActiveDid(did); // Check if we need to load user-specific settings for the new DID if (did) { diff --git a/src/views/QuickActionBvcEndView.vue b/src/views/QuickActionBvcEndView.vue index 51acb81a..8c4126fa 100644 --- a/src/views/QuickActionBvcEndView.vue +++ b/src/views/QuickActionBvcEndView.vue @@ -225,7 +225,7 @@ export default class QuickActionBvcEndView extends Vue { // Initialize notification helper this.notify = createNotifyHelpers(this.$notify); - const settings = await this.$settings(); + const settings = await this.$accountSettings(); this.apiServer = settings.apiServer || ""; this.activeDid = settings.activeDid || ""; diff --git a/src/views/ShareMyContactInfoView.vue b/src/views/ShareMyContactInfoView.vue index 0476352e..6db62fb7 100644 --- a/src/views/ShareMyContactInfoView.vue +++ b/src/views/ShareMyContactInfoView.vue @@ -75,7 +75,7 @@ export default class ShareMyContactInfoView extends Vue { isLoading = false; async mounted() { - const settings = await this.$settings(); + const settings = await this.$accountSettings(); const activeDid = settings?.activeDid; if (!activeDid) { this.$router.push({ name: "home" }); @@ -90,7 +90,7 @@ export default class ShareMyContactInfoView extends Vue { this.isLoading = true; try { - const settings = await this.$settings(); + const settings = await this.$accountSettings(); const account = await this.retrieveAccount(settings); if (!account) {