diff --git a/common/src/abstractions/environment.service.ts b/common/src/abstractions/environment.service.ts index 97daeba225a..8398b4c634e 100644 --- a/common/src/abstractions/environment.service.ts +++ b/common/src/abstractions/environment.service.ts @@ -29,6 +29,6 @@ export abstract class EnvironmentService { getEventsUrl: () => string; getKeyConnectorUrl: () => string; setUrlsFromStorage: () => Promise; - setUrls: (urls: any, saveSettings?: boolean) => Promise; + setUrls: (urls: Urls) => Promise; getUrls: () => Urls; } diff --git a/common/src/services/environment.service.ts b/common/src/services/environment.service.ts index f1842fe9801..a4f0a213e72 100644 --- a/common/src/services/environment.service.ts +++ b/common/src/services/environment.service.ts @@ -126,7 +126,7 @@ export class EnvironmentService implements EnvironmentServiceAbstraction { this.keyConnectorUrl = urls.keyConnector; } - async setUrls(urls: Urls, saveSettings: boolean = true): Promise { + async setUrls(urls: Urls): Promise { urls.base = this.formatUrl(urls.base); urls.webVault = this.formatUrl(urls.webVault); urls.api = this.formatUrl(urls.api); @@ -136,18 +136,16 @@ export class EnvironmentService implements EnvironmentServiceAbstraction { urls.events = this.formatUrl(urls.events); urls.keyConnector = this.formatUrl(urls.keyConnector); - if (saveSettings) { - await this.stateService.setEnvironmentUrls({ - base: urls.base, - api: urls.api, - identity: urls.identity, - webVault: urls.webVault, - icons: urls.icons, - notifications: urls.notifications, - events: urls.events, - keyConnector: urls.keyConnector, - }); - } + await this.stateService.setEnvironmentUrls({ + base: urls.base, + api: urls.api, + identity: urls.identity, + webVault: urls.webVault, + icons: urls.icons, + notifications: urls.notifications, + events: urls.events, + keyConnector: urls.keyConnector, + }); this.baseUrl = urls.base; this.webVaultUrl = urls.webVault;