From 6e00832bb5290dfd1eb320f8f835e9e88c8fae79 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 29 Jun 2026 17:34:13 -0500 Subject: [PATCH] Document future silent device-signals refresh path Co-Authored-By: Claude Opus 4.8 --- src/ageAssurance/data.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/ageAssurance/data.tsx b/src/ageAssurance/data.tsx index 31ae373103..fcd9bce7a1 100644 --- a/src/ageAssurance/data.tsx +++ b/src/ageAssurance/data.tsx @@ -611,6 +611,23 @@ export async function prefetchDeviceSignals({agent}: {agent: AtpAgent}) { `prefetchDeviceSignals: ${cached ? 'restored from cache' : 'no cache'}`, cached, ) + + /* + * Future silent-refresh path (intentionally left commented out). The OS + * returns a previously granted age range without re-prompting, so once a + * region is already cached we could refresh it on load instead of waiting for + * the user to re-verify. We don't do this yet because the native call can + * still surface a prompt for users who never opted in, so it must stay gated + * behind an explicit grant for now. + * + * const geolocation = device.get(['mergedGeolocation']) + * if (cached && geolocation?.countryCode) { + * const signals = await getDeviceSignals() + * if (signals) { + * setDeviceSignalsForRegion({did, region: geolocation, signals}) + * } + * } + */ } export function useDeviceSignalsQuery() { const agent = useAgent()