feat(activeDid): complete API layer with minimal safe $accountSettings update

- Add minimal change to prioritize activeDid from active_identity table
- Maintain all existing complex logic and backward compatibility
- Update migration plan to reflect API layer completion

The $accountSettings method now uses the new active_identity table as primary
source while preserving all existing settings merging and fallback behavior.
This commit is contained in:
Matthew Raymer
2025-09-01 06:16:44 +00:00
parent b4e1313b22
commit a522a10fb7
2 changed files with 15 additions and 11 deletions

View File

@@ -858,7 +858,7 @@ export const PlatformServiceMixin = {
return defaults;
}
// Determine which DID to use - try new active_identity table first, fallback to settings
// Determine which DID to use - prioritize new active_identity table, fallback to settings
const activeIdentity = await this.$getActiveIdentity();
const targetDid =
did || activeIdentity.activeDid || defaultSettings.activeDid;
@@ -875,6 +875,11 @@ export const PlatformServiceMixin = {
defaultSettings,
);
// Ensure activeDid comes from new table when available
if (activeIdentity.activeDid) {
mergedSettings.activeDid = activeIdentity.activeDid;
}
// FIXED: Remove forced override - respect user preferences
// Only set default if no user preference exists
if (