diff --git a/apps/web/src/app/app.component.ts b/apps/web/src/app/app.component.ts index 6b73862445b..019da3982b5 100644 --- a/apps/web/src/app/app.component.ts +++ b/apps/web/src/app/app.component.ts @@ -4,7 +4,7 @@ import { DomSanitizer } from "@angular/platform-browser"; import { NavigationEnd, Router } from "@angular/router"; import * as jq from "jquery"; import { IndividualConfig, ToastrService } from "ngx-toastr"; -import { Subject, switchMap, takeUntil, timer } from "rxjs"; +import { Subject, takeUntil } from "rxjs"; import { EventUploadService } from "@bitwarden/common/abstractions/event/event-upload.service"; import { NotificationsService } from "@bitwarden/common/abstractions/notifications.service"; @@ -14,7 +14,6 @@ import { InternalOrganizationServiceAbstraction } from "@bitwarden/common/admin- import { InternalPolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { KeyConnectorService } from "@bitwarden/common/auth/abstractions/key-connector.service"; -import { PaymentMethodWarningsServiceAbstraction as PaymentMethodWarningService } from "@bitwarden/common/billing/abstractions/payment-method-warnings-service.abstraction"; import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; @@ -46,7 +45,6 @@ import { const BroadcasterSubscriptionId = "AppComponent"; const IdleTimeout = 60000 * 10; // 10 minutes -const PaymentMethodWarningsRefresh = 60000; // 1 Minute @Component({ selector: "app-root", @@ -57,7 +55,6 @@ export class AppComponent implements OnDestroy, OnInit { private idleTimer: number = null; private isIdle = false; private destroy$ = new Subject(); - private paymentMethodWarningsRefresh$ = timer(0, PaymentMethodWarningsRefresh); constructor( @Inject(DOCUMENT) private document: Document, @@ -87,7 +84,6 @@ export class AppComponent implements OnDestroy, OnInit { private dialogService: DialogService, private biometricStateService: BiometricStateService, private stateEventRunnerService: StateEventRunnerService, - private paymentMethodWarningService: PaymentMethodWarningService, private organizationService: InternalOrganizationServiceAbstraction, ) {} @@ -246,21 +242,6 @@ export class AppComponent implements OnDestroy, OnInit { new DisableSendPolicy(), new SendOptionsPolicy(), ]); - - this.paymentMethodWarningsRefresh$ - .pipe( - switchMap(() => this.organizationService.memberOrganizations$), - switchMap( - async (organizations) => - await Promise.all( - organizations.map((organization) => - this.paymentMethodWarningService.update(organization.id), - ), - ), - ), - takeUntil(this.destroy$), - ) - .subscribe(); } ngOnDestroy() { @@ -282,7 +263,6 @@ export class AppComponent implements OnDestroy, OnInit { this.passwordGenerationService.clear(), this.keyConnectorService.clear(), this.biometricStateService.logout(userId as UserId), - this.paymentMethodWarningService.clear(), ]); await this.stateEventRunnerService.handleEvent("logout", userId as UserId); diff --git a/apps/web/src/app/layouts/user-layout.component.html b/apps/web/src/app/layouts/user-layout.component.html index 397e95d485b..ac78bcb6514 100644 --- a/apps/web/src/app/layouts/user-layout.component.html +++ b/apps/web/src/app/layouts/user-layout.component.html @@ -33,8 +33,5 @@ > - diff --git a/apps/web/src/app/layouts/user-layout.component.ts b/apps/web/src/app/layouts/user-layout.component.ts index 2e1813697ef..eaeef6e6139 100644 --- a/apps/web/src/app/layouts/user-layout.component.ts +++ b/apps/web/src/app/layouts/user-layout.component.ts @@ -14,8 +14,6 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { IconModule, LayoutComponent, NavigationModule } from "@bitwarden/components"; -import { PaymentMethodWarningsModule } from "../billing/shared"; - import { PasswordManagerLogo } from "./password-manager-logo"; const BroadcasterSubscriptionId = "UserLayoutComponent"; @@ -24,15 +22,7 @@ const BroadcasterSubscriptionId = "UserLayoutComponent"; selector: "app-user-layout", templateUrl: "user-layout.component.html", standalone: true, - imports: [ - CommonModule, - RouterModule, - JslibModule, - LayoutComponent, - IconModule, - NavigationModule, - PaymentMethodWarningsModule, - ], + imports: [CommonModule, RouterModule, JslibModule, LayoutComponent, IconModule, NavigationModule], }) export class UserLayoutComponent implements OnInit, OnDestroy { protected readonly logo = PasswordManagerLogo; diff --git a/apps/web/src/app/shared/loose-components.module.ts b/apps/web/src/app/shared/loose-components.module.ts index 586f2079627..863efc87692 100644 --- a/apps/web/src/app/shared/loose-components.module.ts +++ b/apps/web/src/app/shared/loose-components.module.ts @@ -58,7 +58,6 @@ import { UpdatePasswordComponent } from "../auth/update-password.component"; import { UpdateTempPasswordComponent } from "../auth/update-temp-password.component"; import { VerifyEmailTokenComponent } from "../auth/verify-email-token.component"; import { VerifyRecoverDeleteComponent } from "../auth/verify-recover-delete.component"; -import { PaymentMethodWarningsModule } from "../billing/shared"; import { DynamicAvatarComponent } from "../components/dynamic-avatar.component"; import { SelectableAvatarComponent } from "../components/selectable-avatar.component"; import { FrontendLayoutComponent } from "../layouts/frontend-layout.component"; @@ -111,7 +110,6 @@ import { SharedModule } from "./shared.module"; HeaderModule, OrganizationLayoutComponent, UserLayoutComponent, - PaymentMethodWarningsModule, ], declarations: [ AcceptFamilySponsorshipComponent,