mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
[PM-3883] Fix ConfigService.serverConfig$ initial values and error handling (#6272)
* Always fetch ServerConfig from server, use stored value as fallback * Handle errors in server fetch
This commit is contained in:
@@ -540,6 +540,7 @@ export default class MainBackground {
|
||||
this.configApiService,
|
||||
this.authService,
|
||||
this.environmentService,
|
||||
this.logService,
|
||||
true
|
||||
);
|
||||
this.browserPopoutWindowService = new BrowserPopoutWindowService();
|
||||
|
||||
@@ -4,6 +4,7 @@ import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
||||
import { ConfigApiServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config-api.service.abstraction";
|
||||
import { ServerConfig } from "@bitwarden/common/platform/abstractions/config/server-config";
|
||||
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||
import { ConfigService } from "@bitwarden/common/platform/services/config/config.service";
|
||||
|
||||
@@ -19,8 +20,9 @@ export class BrowserConfigService extends ConfigService {
|
||||
configApiService: ConfigApiServiceAbstraction,
|
||||
authService: AuthService,
|
||||
environmentService: EnvironmentService,
|
||||
logService: LogService,
|
||||
subscribe = false
|
||||
) {
|
||||
super(stateService, configApiService, authService, environmentService, subscribe);
|
||||
super(stateService, configApiService, authService, environmentService, logService, subscribe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,10 @@ import { EnvironmentService } from "@bitwarden/common/platform/abstractions/envi
|
||||
import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service";
|
||||
import { FileUploadService } from "@bitwarden/common/platform/abstractions/file-upload/file-upload.service";
|
||||
import { I18nService as I18nServiceAbstraction } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { LogService as LogServiceAbstraction } from "@bitwarden/common/platform/abstractions/log.service";
|
||||
import {
|
||||
LogService,
|
||||
LogService as LogServiceAbstraction,
|
||||
} from "@bitwarden/common/platform/abstractions/log.service";
|
||||
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import {
|
||||
@@ -502,6 +505,7 @@ function getBgService<T>(service: keyof MainBackground) {
|
||||
ConfigApiServiceAbstraction,
|
||||
AuthServiceAbstraction,
|
||||
EnvironmentService,
|
||||
LogService,
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user