Add allowsDeviceVerification flag

This commit is contained in:
Eric Bailey
2026-07-01 10:14:38 -05:00
parent 5ea276213f
commit f16e680ffd
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -54,6 +54,7 @@ const AgeAssuranceStateContext = createContext<{
isDeclaredUnderAdultAge: false,
isOverRegionMinAccessAge: false,
isOverAppMinAccessAge: false,
allowsDeviceVerification: false,
},
})
+1
View File
@@ -54,6 +54,7 @@ export type AgeAssuranceFlags = {
isDeclaredUnderAdultAge: boolean
isOverRegionMinAccessAge: boolean
isOverAppMinAccessAge: boolean
allowsDeviceVerification: boolean
}
export function parseStatusFromString(raw: string) {
+4
View File
@@ -16,6 +16,7 @@ import {
type AgeAssuranceMetadata,
type AgeAssuranceState,
} from '#/ageAssurance/types'
import {IS_WEB} from '#/env'
import {type Geolocation, useGeolocation} from '#/geolocation'
/**
@@ -187,6 +188,8 @@ export function computeAgeAssuranceFlags({
: false
const adultContentDisabled =
state.access !== AgeAssuranceAccess.Full || isDeclaredUnderAdultAge
const allowsDeviceVerification =
regionAllowsDeviceVerification(regionConfig) && !IS_WEB
return {
isAgeRestricted,
@@ -196,5 +199,6 @@ export function computeAgeAssuranceFlags({
isDeclaredUnderAdultAge,
isOverRegionMinAccessAge,
isOverAppMinAccessAge,
allowsDeviceVerification,
}
}