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 <noreply@anthropic.com>
This commit is contained in:
Eric Bailey
2026-06-24 10:54:24 -05:00
parent 2bfc1e6166
commit 4e808872d4
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -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 {
+5 -4
View File
@@ -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 =