feat(db): implement active identity table separation #180

Open
anomalist wants to merge 24 commits from activedid_migration into master
5 changed files with 14 additions and 8 deletions
Showing only changes of commit bdac9e0da3 - Show all commits

View File

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

View File

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

View File

@@ -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,
);
}

View File

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

View File

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