mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
Auth/PM-5712 - Extension & Desktop Account Switcher - Fix incorrect env showing when adding new accounts (#13362)
* PM-5712 - Refactor env service to require user id instead of having global and active user state fallbacks per working session with Justin. * PM-5712 - AccountSwitcherService tests - fix tests and add env assertions.
This commit is contained in:
@@ -110,7 +110,9 @@ export class AccountSwitcherComponent implements OnInit {
|
||||
name: active.name,
|
||||
email: active.email,
|
||||
avatarColor: await firstValueFrom(this.avatarService.avatarColor$),
|
||||
server: (await this.environmentService.getEnvironment())?.getHostname(),
|
||||
server: (
|
||||
await firstValueFrom(this.environmentService.getEnvironment$(active.id))
|
||||
)?.getHostname(),
|
||||
};
|
||||
}),
|
||||
);
|
||||
@@ -221,7 +223,9 @@ export class AccountSwitcherComponent implements OnInit {
|
||||
email: baseAccounts[userId].email,
|
||||
authenticationStatus: await this.authService.getAuthStatus(userId),
|
||||
avatarColor: await firstValueFrom(this.avatarService.getUserAvatarColor$(userId as UserId)),
|
||||
server: (await this.environmentService.getEnvironment(userId))?.getHostname(),
|
||||
server: (
|
||||
await firstValueFrom(this.environmentService.getEnvironment$(userId as UserId))
|
||||
)?.getHostname(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user