Small fix to bday handling

This commit is contained in:
Eric Bailey
2025-12-04 13:03:11 -06:00
parent 7cbddeef9f
commit 6a8a2143ec
2 changed files with 7 additions and 9 deletions
@@ -54,6 +54,8 @@ export function NoAccessScreen() {
const {logoutCurrentAccount} = useSessionApi()
const createSupportLink = useCreateSupportLink()
const aa = useAgeAssurance()
const isBlocked = aa.state.status === aa.Status.Blocked
const isAARegion = !!region
const hasDeclaredAge = data?.declaredAge !== undefined
const canUpdateBirthday =
@@ -79,7 +81,7 @@ export function NoAccessScreen() {
const birthdateUpdateText = canUpdateBirthday ? (
<Text style={[textStyles]}>
<Trans>
If your birthdate is not accurate, you can update it by{' '}
If you believe your birthdate is incorrect, you can update it by{' '}
<SimpleInlineLinkText
label={_(msg`Click here to update your birthdate`)}
style={[textStyles]}
@@ -94,7 +96,7 @@ export function NoAccessScreen() {
) : (
<Text style={[textStyles]}>
<Trans>
If you accidentally typed an incorrect birthdate, please{' '}
If you believe your birthdate is incorrect, please{' '}
<SimpleInlineLinkText
to={createSupportLink({code: SupportCode.AA_BIRTHDATE})}
label={_(msg`Click here to contact our support team`)}
@@ -145,7 +147,7 @@ export function NoAccessScreen() {
</Trans>
</Text>
{birthdateUpdateText}
{!isBlocked && birthdateUpdateText}
</View>
<AccessSection />
+2 -6
View File
@@ -19,7 +19,7 @@ import {snoozeBirthdateUpdateAllowedForDid} from '#/state/birthdate'
import {useAgent, useSession} from '#/state/session'
import * as debug from '#/ageAssurance/debug'
import {logger} from '#/ageAssurance/logger'
import {isLegacyBirthdateBug, isUserUnderMinimumAge} from '#/ageAssurance/util'
import {isLegacyBirthdateBug} from '#/ageAssurance/util'
import {IS_DEV} from '#/env'
import {device} from '#/storage'
@@ -334,11 +334,7 @@ export async function getOtherRequiredData({
* If the user is under the minimum age, and the birthdate is not due to
* the legacy bug, snooze further birthdate updates for this user.
*/
if (
data.birthdate &&
isUserUnderMinimumAge(data.birthdate) &&
!isLegacyBirthdateBug(data.birthdate)
) {
if (data.birthdate && !isLegacyBirthdateBug(data.birthdate)) {
snoozeBirthdateUpdateAllowedForDid(did!)
}