Debug edits

This commit is contained in:
Eric Bailey
2026-06-29 18:22:11 -05:00
parent b7975edd12
commit 4c60eae9e2
2 changed files with 15 additions and 16 deletions
+11 -12
View File
@@ -27,25 +27,18 @@ export const geolocation: Geolocation | undefined = enabled
} }
: undefined : undefined
/**
* When debug is enabled we mock the `deviceSignals` response by default. Set
* this to `false` to hit the real native age API (`expo-age-range`) so the OS
* age prompt actually shows — useful for testing the device flow on a physical
* device.
*/
export const useMockDeviceSignalsAPIResponse = true
const deviceGeolocationEnabled = false || IS_E2E const deviceGeolocationEnabled = false || IS_E2E
export const deviceGeolocation: Geolocation | undefined = export const deviceGeolocation: Geolocation | undefined =
enabled && deviceGeolocationEnabled enabled && deviceGeolocationEnabled
? { ? {
countryCode: 'AA', countryCode: 'AA',
regionCode: undefined, regionCode: undefined,
...geolocation,
} }
: undefined : undefined
export const otherRequiredData: OtherRequiredData = { export const otherRequiredData: OtherRequiredData = {
birthdate: new Date(2010, 12, 1).toISOString(), birthdate: new Date(2000, 12, 1).toISOString(),
} }
const serverStateEnabled = false || IS_E2E const serverStateEnabled = false || IS_E2E
@@ -295,13 +288,19 @@ export const config: DebugConfig = {
], ],
} }
const deviceSignalsEnabled = true /**
* When debug is enabled we mock the `deviceSignals` response by default. Set
* this to `false` to hit the real native age API (`expo-age-range`) so the OS
* age prompt actually shows — useful for testing the device flow on a physical
* device.
*/
export const useMockDeviceSignalsAPIResponse = true
export const deviceSignals: AgeRange.AgeRangeResponse | undefined = export const deviceSignals: AgeRange.AgeRangeResponse | undefined =
deviceSignalsEnabled useMockDeviceSignalsAPIResponse
? { ? {
// Simulates the OS reporting the user is at least 18. Lower this below // Simulates the OS reporting the user is at least 18. Lower this below
// a region's IfAssuredOverAge threshold to exercise the KWS fallback. // a region's IfAssuredOverAge threshold to exercise the KWS fallback.
lowerBound: 18, lowerBound: 16,
upperBound: null, upperBound: null,
} }
: undefined : undefined
+4 -4
View File
@@ -5,8 +5,8 @@ import {type Geolocation} from '#/geolocation/types'
const localEnabled = false const localEnabled = false
export const enabled = IS_DEV && (localEnabled || aaDebug.geolocation) export const enabled = IS_DEV && (localEnabled || aaDebug.geolocation)
export const geolocation: Geolocation = aaDebug.geolocation ?? { export const geolocation: Geolocation = aaDebug.geolocation ?? {
countryCode: 'US', countryCode: 'AA',
regionCode: 'TX', regionCode: undefined,
} }
const deviceLocalEnabled = false const deviceLocalEnabled = false
@@ -14,8 +14,8 @@ export const deviceGeolocation: Geolocation | undefined =
aaDebug.deviceGeolocation || aaDebug.deviceGeolocation ||
(deviceLocalEnabled (deviceLocalEnabled
? { ? {
countryCode: 'US', countryCode: 'AA',
regionCode: 'TX', regionCode: undefined,
} }
: undefined) : undefined)