mirror of
https://github.com/bitwarden/browser
synced 2026-02-10 13:40:06 +00:00
Enable sdk crypto usage in the browser extension by listening to config updates
This commit is contained in:
@@ -1330,6 +1330,8 @@ export default class MainBackground {
|
||||
this.syncServiceListener?.listener$().subscribe();
|
||||
await this.autoSubmitLoginBackground.init();
|
||||
|
||||
this.configService.broadcastConfigChangesTo(this.encryptService, this.bulkEncryptService);
|
||||
|
||||
if (
|
||||
BrowserApi.isManifestVersion(2) &&
|
||||
(await this.configService.getFeatureFlag(FeatureFlag.PM4154_BulkEncryptionService))
|
||||
|
||||
@@ -3,6 +3,8 @@ import { inject, Inject, Injectable } from "@angular/core";
|
||||
|
||||
import { AbstractThemingService } from "@bitwarden/angular/platform/services/theming/theming.service.abstraction";
|
||||
import { TwoFactorService } from "@bitwarden/common/auth/abstractions/two-factor.service";
|
||||
import { EncryptService } from "@bitwarden/common/key-management/crypto/abstractions/encrypt.service";
|
||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { LogService as LogServiceAbstraction } from "@bitwarden/common/platform/abstractions/log.service";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
@@ -27,6 +29,8 @@ export class InitService {
|
||||
private themingService: AbstractThemingService,
|
||||
private sdkLoadService: SdkLoadService,
|
||||
private viewCacheService: PopupViewCacheService,
|
||||
private encryptService: EncryptService,
|
||||
private configService: ConfigService,
|
||||
@Inject(DOCUMENT) private document: Document,
|
||||
) {}
|
||||
|
||||
@@ -58,6 +62,8 @@ export class InitService {
|
||||
this.logService.info("Force redraw is on");
|
||||
}
|
||||
|
||||
this.configService.broadcastConfigChangesTo(this.encryptService);
|
||||
|
||||
this.setupVaultPopupHeartbeat();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user