mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 01:33:33 +00:00
[PM-5979] Refactor EnvironmentService (#8040)
Refactor environment service to emit a single observable. This required significant changes to how the environment service behaves and tackles much of the tech debt planned for it.
This commit is contained in:
@@ -222,12 +222,12 @@ function getBgService<T>(service: keyof MainBackground) {
|
||||
},
|
||||
{
|
||||
provide: BrowserEnvironmentService,
|
||||
useExisting: EnvironmentService,
|
||||
useClass: BrowserEnvironmentService,
|
||||
deps: [LogService, StateProvider, AccountServiceAbstraction],
|
||||
},
|
||||
{
|
||||
provide: EnvironmentService,
|
||||
useFactory: getBgService<EnvironmentService>("environmentService"),
|
||||
deps: [],
|
||||
useExisting: BrowserEnvironmentService,
|
||||
},
|
||||
{ provide: TotpService, useFactory: getBgService<TotpService>("totpService"), deps: [] },
|
||||
{
|
||||
@@ -480,6 +480,7 @@ function getBgService<T>(service: keyof MainBackground) {
|
||||
ConfigApiServiceAbstraction,
|
||||
AuthServiceAbstraction,
|
||||
EnvironmentService,
|
||||
StateProvider,
|
||||
LogService,
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user