From 4c60eae9e273c23e23bda365d5de93c2f1598297 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 29 Jun 2026 18:22:11 -0500 Subject: [PATCH] Debug edits --- src/ageAssurance/debug.ts | 23 +++++++++++------------ src/geolocation/debug.ts | 8 ++++---- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/ageAssurance/debug.ts b/src/ageAssurance/debug.ts index 1b8d54e286..55023c5ba6 100644 --- a/src/ageAssurance/debug.ts +++ b/src/ageAssurance/debug.ts @@ -27,25 +27,18 @@ export const geolocation: Geolocation | undefined = enabled } : 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 export const deviceGeolocation: Geolocation | undefined = enabled && deviceGeolocationEnabled ? { countryCode: 'AA', regionCode: undefined, + ...geolocation, } : undefined export const otherRequiredData: OtherRequiredData = { - birthdate: new Date(2010, 12, 1).toISOString(), + birthdate: new Date(2000, 12, 1).toISOString(), } 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 = - deviceSignalsEnabled + useMockDeviceSignalsAPIResponse ? { // Simulates the OS reporting the user is at least 18. Lower this below // a region's IfAssuredOverAge threshold to exercise the KWS fallback. - lowerBound: 18, + lowerBound: 16, upperBound: null, } : undefined diff --git a/src/geolocation/debug.ts b/src/geolocation/debug.ts index 0d2564c305..1b50343cac 100644 --- a/src/geolocation/debug.ts +++ b/src/geolocation/debug.ts @@ -5,8 +5,8 @@ import {type Geolocation} from '#/geolocation/types' const localEnabled = false export const enabled = IS_DEV && (localEnabled || aaDebug.geolocation) export const geolocation: Geolocation = aaDebug.geolocation ?? { - countryCode: 'US', - regionCode: 'TX', + countryCode: 'AA', + regionCode: undefined, } const deviceLocalEnabled = false @@ -14,8 +14,8 @@ export const deviceGeolocation: Geolocation | undefined = aaDebug.deviceGeolocation || (deviceLocalEnabled ? { - countryCode: 'US', - regionCode: 'TX', + countryCode: 'AA', + regionCode: undefined, } : undefined)