mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
[PM-7535] Remove Uses of getUserId (#10837)
* Remove Uses of `getUserId` * Fix Test
This commit is contained in:
@@ -551,7 +551,11 @@ export class GetCommand extends DownloadCommand {
|
||||
private async getFingerprint(id: string) {
|
||||
let fingerprint: string[] = null;
|
||||
if (id === "me") {
|
||||
fingerprint = await this.cryptoService.getFingerprint(await this.stateService.getUserId());
|
||||
const activeUserId = await firstValueFrom(
|
||||
this.accountService.activeAccount$.pipe(map((a) => a?.id)),
|
||||
);
|
||||
const publicKey = await firstValueFrom(this.cryptoService.userPublicKey$(activeUserId));
|
||||
fingerprint = await this.cryptoService.getFingerprint(activeUserId, publicKey);
|
||||
} else if (Utils.isGuid(id)) {
|
||||
try {
|
||||
const response = await this.apiService.getUserPublicKey(id);
|
||||
|
||||
Reference in New Issue
Block a user