From 4e808872d4f0e55299f3577bbbe0cca638199223 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 24 Jun 2026 10:54:24 -0500 Subject: [PATCH] Rename device-signals debug flag to useMockDeviceSignalsAPIResponse Invert the flag's polarity and name so it reads like the other "enable" booleans in the debug module: useMockDeviceSignalsAPIResponse defaults to true (mock the native response), set false to hit the real API. Co-Authored-By: Claude Opus 4.8 --- src/ageAssurance/data.tsx | 2 +- src/ageAssurance/debug.ts | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ageAssurance/data.tsx b/src/ageAssurance/data.tsx index 6f55143e16..31ae373103 100644 --- a/src/ageAssurance/data.tsx +++ b/src/ageAssurance/data.tsx @@ -503,7 +503,7 @@ export function createDeviceSignalsQueryKey({did}: {did: string}) { export async function getDeviceSignals(): Promise< AgeRange.AgeRangeResponse | undefined > { - if (debug.enabled && !debug.useRealDeviceSignalsAPI) + if (debug.enabled && debug.useMockDeviceSignalsAPIResponse) return debug.resolve(debug.deviceSignals) if (!IS_NATIVE) return undefined try { diff --git a/src/ageAssurance/debug.ts b/src/ageAssurance/debug.ts index 3327ca2924..1b8d54e286 100644 --- a/src/ageAssurance/debug.ts +++ b/src/ageAssurance/debug.ts @@ -28,11 +28,12 @@ export const geolocation: Geolocation | undefined = enabled : undefined /** - * When debug is enabled we normally fake `deviceSignals` too. Flip this 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. + * 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 useRealDeviceSignalsAPI = false +export const useMockDeviceSignalsAPIResponse = true const deviceGeolocationEnabled = false || IS_E2E export const deviceGeolocation: Geolocation | undefined =