1
0
mirror of https://github.com/bitwarden/desktop synced 2026-02-15 07:55:12 +00:00

Refactor SystemService

This commit is contained in:
Thomas Rittson
2022-03-28 06:50:05 +10:00
parent 0c400e7358
commit 50a1d19fa4

View File

@@ -9,6 +9,7 @@ import { EventService as EventServiceAbstraction } from "jslib-common/abstractio
import { I18nService as I18nServiceAbstraction } from "jslib-common/abstractions/i18n.service";
import {
CLIENT_TYPE,
RELOAD_CALLBACK,
SECURE_STORAGE,
STATE_FACTORY,
WINDOW_TOKEN,
@@ -151,14 +152,13 @@ export function initFactory(
provide: CryptoServiceAbstraction,
useClass: ElectronCryptoService,
},
{
provide: RELOAD_CALLBACK,
useValue: null,
},
{
provide: SystemServiceAbstraction,
useFactory: (
messagingService: MessagingServiceAbstraction,
platformUtilsService: PlatformUtilsServiceAbstraction,
stateService: StateServiceAbstraction
) => new SystemService(messagingService, platformUtilsService, null, stateService),
deps: [MessagingServiceAbstraction, PlatformUtilsServiceAbstraction, StateServiceAbstraction],
useClass: SystemService,
},
{ provide: PasswordRepromptServiceAbstraction, useClass: PasswordRepromptService },
NativeMessagingService,