Guard location sentence on resolved name, document deviceSignalsFailed scope

createGeolocationString intentionally returns undefined when the country
code can't be resolved to a display name, but the NoAccessScreen location
sentence only guarded on the config region, rendering "we think you're
in ." with an empty hole. Guard on the string itself, matching the
account card's RegionNotice.

Also document that deviceSignalsFailed is in-memory and per-hook-instance
by design: a soft "don't immediately re-offer" signal, not a persisted
judgment about device capability.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Eric Bailey
2026-07-02 14:35:35 -05:00
parent 64123353ce
commit bbc8c8cb26
2 changed files with 8 additions and 1 deletions
@@ -178,7 +178,7 @@ export function NoAccessScreen() {
</Trans>
</Text>
{region && (
{region && geolocationString && (
<Text style={[textStyles]}>
{isUsingGPS ? (
<Trans>
+7
View File
@@ -48,6 +48,13 @@ export function useAgeAssuranceVerificationFlow({
const allowsDeviceVerification = region && aa.flags.allowsDeviceVerification
const [isVerifying, setIsVerifying] = useState(false)
/*
* In-memory only, and scoped to this hook instance: each surface using this
* hook tracks its own failure, and a remount (or another surface) starts
* fresh and will offer the device flow again. That's intentional for now -
* it's a soft "don't immediately re-offer" signal, not a persisted judgment
* that the device can't provide signals.
*/
const [deviceSignalsFailed, setDeviceSignalsFailed] = useState(false)
const verifyCta =