diff --git a/libs/common/src/platform/abstractions/environment.service.ts b/libs/common/src/platform/abstractions/environment.service.ts index c1a2b072534..0293d68903c 100644 --- a/libs/common/src/platform/abstractions/environment.service.ts +++ b/libs/common/src/platform/abstractions/environment.service.ts @@ -92,23 +92,9 @@ export interface Environment { * The environment service. Provides access to set the current environment urls and region. */ export abstract class EnvironmentService { - /** - * An observable that follows the environment of the active user if there is one or falls - * back to the environment saved in global state. - */ abstract environment$: Observable; - - /** - * An observable that follows the cloud web vault url for the active user if there is one - * or falls back to the cloud web vault url saved in global state. - */ abstract cloudWebVaultUrl$: Observable; - /** - * Gets an observable stream of the configured Environment for a given user. - * @param userId The id of the user to get the environment for. - */ - abstract userEnvironment$(userId: UserId): Observable; /** * Retrieve all the available regions for environment selectors. * @@ -141,8 +127,6 @@ export abstract class EnvironmentService { /** * Get the environment from state. Useful if you need to get the environment for another user. - * - * @deprecated Use {@link userEnvironment$} with a {@link UserId} to get the environment for a given user. */ abstract getEnvironment(userId?: string): Promise; } diff --git a/libs/common/src/platform/services/default-environment.service.ts b/libs/common/src/platform/services/default-environment.service.ts index b575f6fe8b8..8ed673d066e 100644 --- a/libs/common/src/platform/services/default-environment.service.ts +++ b/libs/common/src/platform/services/default-environment.service.ts @@ -181,14 +181,6 @@ export class DefaultEnvironmentService implements EnvironmentService { return PRODUCTION_REGIONS.concat(this.additionalRegionConfigs); } - userEnvironment$(userId: UserId): Observable { - return this.stateProvider - .getUser(userId, USER_ENVIRONMENT_KEY) - .state$.pipe( - map((environment) => this.buildEnvironment(environment?.region, environment?.urls)), - ); - } - /** * Get the region configuration for the given region. */