refactor: update components for ActiveDid migration compatibility

- Update all components to use new active_identity API methods
- Ensure consistent activeDid retrieval across all views
- Add proper error handling for activeDid migration
- Update component interfaces for new API structure
This commit is contained in:
Matthew Raymer
2025-09-02 10:24:02 +00:00
parent 552de23ef2
commit 2db4f8f894
7 changed files with 13 additions and 9 deletions

View File

@@ -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(

View File

@@ -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) {

View File

@@ -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 || "";

View File

@@ -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) {