diff --git a/src/background/main.background.ts b/src/background/main.background.ts index 974a505852..0e8bd05966 100644 --- a/src/background/main.background.ts +++ b/src/background/main.background.ts @@ -3,6 +3,7 @@ import { CipherType } from 'jslib/enums'; import { ApiService, AppIdService, + AuditService, CipherService, CollectionService, ConstantsService, @@ -23,6 +24,7 @@ import { import { ApiService as ApiServiceAbstraction, AppIdService as AppIdServiceAbstraction, + AuditService as AuditServiceAbstraction, CipherService as CipherServiceAbstraction, CollectionService as CollectionServiceAbstraction, CryptoService as CryptoServiceAbstraction, @@ -88,6 +90,7 @@ export default class MainBackground { totpService: TotpServiceAbstraction; autofillService: AutofillServiceAbstraction; containerService: ContainerService; + auditService: AuditServiceAbstraction; analytics: Analytics; onUpdatedRan: boolean; @@ -147,6 +150,7 @@ export default class MainBackground { this.autofillService = new AutofillService(this.cipherService, this.tokenService, this.totpService, this.utilsService, this.platformUtilsService); this.containerService = new ContainerService(this.cryptoService, this.platformUtilsService); + this.auditService = new AuditService(this.cryptoService); this.analytics = new Analytics(window, () => BrowserApi.gaFilter(), this.platformUtilsService, this.storageService, this.appIdService); diff --git a/src/popup/app/services/background.service.ts b/src/popup/app/services/background.service.ts index 40e1bbd43f..2b3ae7934b 100644 --- a/src/popup/app/services/background.service.ts +++ b/src/popup/app/services/background.service.ts @@ -4,6 +4,7 @@ import { ConstantsService } from 'jslib/services/constants.service'; import { ApiService } from 'jslib/abstractions/api.service'; import { AppIdService } from 'jslib/abstractions/appId.service'; +import { AuditService } from 'jslib/abstractions/audit.service'; import { CipherService } from 'jslib/abstractions/cipher.service'; import { CollectionService } from 'jslib/abstractions/collection.service'; import { CryptoService } from 'jslib/abstractions/crypto.service'; @@ -51,3 +52,4 @@ export const lockService = getBackgroundService('lockService'); export const totpService = getBackgroundService('totpService'); export const environmentService = getBackgroundService('environmentService'); export const collectionService = getBackgroundService('collectionService'); +export const auditService = getBackgroundService('auditService'); diff --git a/src/popup/app/services/services.module.ts b/src/popup/app/services/services.module.ts index 2662a58be9..0330066425 100644 --- a/src/popup/app/services/services.module.ts +++ b/src/popup/app/services/services.module.ts @@ -4,7 +4,6 @@ import { PopupUtilsService } from './popupUtils.service'; import { StateService } from './state.service'; import { ValidationService } from './validation.service'; -import { AuditService } from 'jslib/services/audit.service'; import { AuthService } from 'jslib/services/auth.service'; import BrowserMessagingService from '../../../services/browserMessaging.service'; @@ -44,6 +43,6 @@ export default angular .factory('totpService', backgroundServices.totpService) .factory('environmentService', backgroundServices.environmentService) .factory('collectionService', backgroundServices.collectionService) - .factory('auditService', AuditService) + .factory('auditService', backgroundServices.auditService) .name;