From ff10228fb696d90d74f258544c9eb92f33623096 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 1 Jul 2026 10:34:51 -0500 Subject: [PATCH] More flag cleanup --- src/ageAssurance/components/NoAccessScreen.tsx | 2 +- src/ageAssurance/index.tsx | 1 + src/ageAssurance/types.ts | 1 + src/ageAssurance/util.ts | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ageAssurance/components/NoAccessScreen.tsx b/src/ageAssurance/components/NoAccessScreen.tsx index d179c08226..59e2d91d11 100644 --- a/src/ageAssurance/components/NoAccessScreen.tsx +++ b/src/ageAssurance/components/NoAccessScreen.tsx @@ -71,7 +71,7 @@ export function NoAccessScreen() { const aa = useAgeAssurance() const isBlocked = aa.state.status === aa.Status.Blocked const isAARegion = !!region - const hasDeclaredAge = metadata?.declaredAge !== undefined + const hasDeclaredAge = aa.flags.hasDeclaredAge const canUpdateBirthday = isBirthdateUpdateAllowed || isLegacyBirthdateBug(metadata?.birthdate || '') diff --git a/src/ageAssurance/index.tsx b/src/ageAssurance/index.tsx index 15a2332110..dc1c9bd3f3 100644 --- a/src/ageAssurance/index.tsx +++ b/src/ageAssurance/index.tsx @@ -51,6 +51,7 @@ const AgeAssuranceStateContext = createContext<{ adultContentDisabled: false, chatDisabled: false, groupChatDisabled: false, + hasDeclaredAge: false, isDeclaredUnderAdultAge: false, isOverRegionMinAccessAge: false, isOverAppMinAccessAge: false, diff --git a/src/ageAssurance/types.ts b/src/ageAssurance/types.ts index 4678af4021..1c4784da84 100644 --- a/src/ageAssurance/types.ts +++ b/src/ageAssurance/types.ts @@ -51,6 +51,7 @@ export type AgeAssuranceFlags = { adultContentDisabled: boolean chatDisabled: boolean groupChatDisabled: boolean + hasDeclaredAge: boolean isDeclaredUnderAdultAge: boolean isOverRegionMinAccessAge: boolean isOverAppMinAccessAge: boolean diff --git a/src/ageAssurance/util.ts b/src/ageAssurance/util.ts index 0ad5b31ea2..955e4c129c 100644 --- a/src/ageAssurance/util.ts +++ b/src/ageAssurance/util.ts @@ -199,6 +199,7 @@ export function computeAgeAssuranceFlags({ adultContentDisabled, chatDisabled, groupChatDisabled, + hasDeclaredAge: metadata?.declaredAge !== undefined, isDeclaredUnderAdultAge, isOverRegionMinAccessAge, isOverAppMinAccessAge,