From 120132fe8aaa4727903b95763350de7d7d611a8f Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Wed, 4 Oct 2023 09:47:20 -0400 Subject: [PATCH] Update accountService when new account added to state service This will eventually be inverted --- libs/common/src/platform/services/state.service.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/common/src/platform/services/state.service.ts b/libs/common/src/platform/services/state.service.ts index 4c223e2af8..b7fcdda1df 100644 --- a/libs/common/src/platform/services/state.service.ts +++ b/libs/common/src/platform/services/state.service.ts @@ -200,11 +200,6 @@ export class StateService< } async addAccount(account: TAccount) { - // this.accountService.addAccount(account.profile.userId as UserId, { - // email: account.profile.email, - // name: account.profile.name, - // status: AuthenticationStatus.Locked, - // }); account = await this.setAccountEnvironment(account); await this.updateState(async (state) => { state.authenticatedAccounts.push(account.profile.userId); @@ -214,6 +209,11 @@ export class StateService< }); await this.scaffoldNewAccountStorage(account); await this.setLastActive(new Date().getTime(), { userId: account.profile.userId }); + this.accountService.addAccount(account.profile.userId as UserId, { + status: AuthenticationStatus.Locked, + name: account.profile.name, + email: account.profile.email, + }); await this.setActiveUser(account.profile.userId); this.activeAccountSubject.next(account.profile.userId); }