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:
@@ -178,7 +178,7 @@ export function NoAccessScreen() {
|
||||
</Trans>
|
||||
</Text>
|
||||
|
||||
{region && (
|
||||
{region && geolocationString && (
|
||||
<Text style={[textStyles]}>
|
||||
{isUsingGPS ? (
|
||||
<Trans>
|
||||
|
||||
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user