From 2977616be4b6e849386671c2d166c039403d09ea Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Wed, 3 Apr 2024 09:28:36 -0500 Subject: [PATCH] Use user definition clearon events for billing (#8589) --- libs/common/src/billing/models/billing-keys.state.ts | 5 +++-- .../account/billing-account-profile-state.service.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libs/common/src/billing/models/billing-keys.state.ts b/libs/common/src/billing/models/billing-keys.state.ts index 8367ff7fbe..1d1cce6d0b 100644 --- a/libs/common/src/billing/models/billing-keys.state.ts +++ b/libs/common/src/billing/models/billing-keys.state.ts @@ -1,7 +1,7 @@ -import { BILLING_DISK, KeyDefinition } from "../../platform/state"; +import { BILLING_DISK, UserKeyDefinition } from "../../platform/state"; import { PaymentMethodWarning } from "../models/domain/payment-method-warning"; -export const PAYMENT_METHOD_WARNINGS_KEY = KeyDefinition.record( +export const PAYMENT_METHOD_WARNINGS_KEY = UserKeyDefinition.record( BILLING_DISK, "paymentMethodWarnings", { @@ -9,5 +9,6 @@ export const PAYMENT_METHOD_WARNINGS_KEY = KeyDefinition.record( +export const BILLING_ACCOUNT_PROFILE_KEY_DEFINITION = new UserKeyDefinition( BILLING_DISK, "accountProfile", { deserializer: (billingAccountProfile) => billingAccountProfile, + clearOn: ["logout"], }, );