From b4dbace7a6f8f2aaeb01eb9cd7f7ed0ca696de12 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Mon, 11 Dec 2023 13:44:23 -0500 Subject: [PATCH] Do not drop optional parameters in overrides (#7176) --- .../src/platform/services/browser-crypto.service.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/browser/src/platform/services/browser-crypto.service.ts b/apps/browser/src/platform/services/browser-crypto.service.ts index 0166fd439b..5439620660 100644 --- a/apps/browser/src/platform/services/browser-crypto.service.ts +++ b/apps/browser/src/platform/services/browser-crypto.service.ts @@ -18,15 +18,18 @@ export class BrowserCryptoService extends CryptoService { * Browser doesn't store biometric keys, so we retrieve them from the desktop and return * if we successfully saved it into memory as the User Key */ - protected override async getKeyFromStorage(keySuffix: KeySuffixOptions): Promise { + protected override async getKeyFromStorage( + keySuffix: KeySuffixOptions, + userId?: string, + ): Promise { if (keySuffix === KeySuffixOptions.Biometric) { await this.platformUtilService.authenticateBiometric(); - const userKey = await this.stateService.getUserKey(); + const userKey = await this.stateService.getUserKey({ userId: userId }); if (userKey) { return new SymmetricCryptoKey(Utils.fromB64ToArray(userKey.keyB64)) as UserKey; } } - return await super.getKeyFromStorage(keySuffix); + return await super.getKeyFromStorage(keySuffix, userId); } }