From bdac9e0da392c26720f261a7dacf562ddd8f614a Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Fri, 22 Aug 2025 10:51:49 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20migrate=20batch=204=20components=20to?= =?UTF-8?q?=20active=20identity=20fa=C3=A7ade?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update HelpView, ConfirmGiftView, TestView, ClaimReportCertificateView - Update ImportAccountView with conditional activeDid check - Replace settings.activeDid with () façade method - Add consistent migration comments for future reference Batch 4 completes migration of 5 additional medium-priority components with various usage patterns. --- src/views/ClaimReportCertificateView.vue | 3 ++- src/views/ConfirmGiftView.vue | 3 ++- src/views/HelpView.vue | 6 ++++-- src/views/ImportAccountView.vue | 7 ++++--- src/views/TestView.vue | 3 ++- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/views/ClaimReportCertificateView.vue b/src/views/ClaimReportCertificateView.vue index dbbae98d..fd6b5594 100644 --- a/src/views/ClaimReportCertificateView.vue +++ b/src/views/ClaimReportCertificateView.vue @@ -54,7 +54,8 @@ export default class ClaimReportCertificateView extends Vue { this.notify = createNotifyHelpers(this.$notify); const settings = await this.$settings(); - this.activeDid = settings.activeDid || ""; + // Use new Active Identity façade instead of settings.activeDid + this.activeDid = (await this.$getActiveDid()) || ""; this.apiServer = settings.apiServer || ""; const pathParams = window.location.pathname.substring( "/claim-cert/".length, diff --git a/src/views/ConfirmGiftView.vue b/src/views/ConfirmGiftView.vue index c2274dab..c82532bd 100644 --- a/src/views/ConfirmGiftView.vue +++ b/src/views/ConfirmGiftView.vue @@ -547,7 +547,8 @@ export default class ConfirmGiftView extends Vue { */ private async initializeSettings() { const settings = await this.$accountSettings(); - this.activeDid = settings.activeDid || ""; + // Use new Active Identity façade instead of settings.activeDid + this.activeDid = (await this.$getActiveDid()) || ""; this.apiServer = settings.apiServer || ""; this.allContacts = await this.$getAllContacts(); this.isRegistered = settings.isRegistered || false; diff --git a/src/views/HelpView.vue b/src/views/HelpView.vue index fff71f21..c1a86821 100644 --- a/src/views/HelpView.vue +++ b/src/views/HelpView.vue @@ -679,7 +679,9 @@ export default class HelpView extends Vue { try { const settings = await this.$accountSettings(); - if (settings.activeDid) { + // Use new Active Identity façade instead of settings.activeDid + const activeDid = await this.$getActiveDid(); + if (activeDid) { await this.$updateSettings({ ...settings, finishedOnboarding: false, @@ -687,7 +689,7 @@ export default class HelpView extends Vue { this.$log( "[HelpView] Onboarding reset successfully for DID: " + - settings.activeDid, + activeDid, ); } diff --git a/src/views/ImportAccountView.vue b/src/views/ImportAccountView.vue index 97d1d22d..06d79816 100644 --- a/src/views/ImportAccountView.vue +++ b/src/views/ImportAccountView.vue @@ -207,11 +207,12 @@ export default class ImportAccountView extends Vue { // Check what was actually imported const settings = await this.$accountSettings(); - // Check account-specific settings - if (settings?.activeDid) { + // Check account-specific settings using Active Identity façade + const activeDid = await this.$getActiveDid(); + if (activeDid) { try { await this.$query("SELECT * FROM settings WHERE accountDid = ?", [ - settings.activeDid, + activeDid, ]); } catch (error) { // Log error but don't interrupt import flow diff --git a/src/views/TestView.vue b/src/views/TestView.vue index df879ad2..ec9101ab 100644 --- a/src/views/TestView.vue +++ b/src/views/TestView.vue @@ -541,7 +541,8 @@ export default class Help extends Vue { */ async mounted() { const settings = await this.$accountSettings(); - this.activeDid = settings.activeDid || ""; + // Use new Active Identity façade instead of settings.activeDid + this.activeDid = (await this.$getActiveDid()) || ""; this.apiServer = settings.apiServer || ""; this.userName = settings.firstName;