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:
@@ -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 {
|
||||
|
||||
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user