Skip to content

Commit

Permalink
Do not drop optional parameters in overrides (#7176)
Browse files Browse the repository at this point in the history
  • Loading branch information
MGibson1 authored Dec 11, 2023
1 parent a40643d commit b4dbace
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions apps/browser/src/platform/services/browser-crypto.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<UserKey> {
protected override async getKeyFromStorage(
keySuffix: KeySuffixOptions,
userId?: string,
): Promise<UserKey> {
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);
}
}

0 comments on commit b4dbace

Please sign in to comment.