diff --git a/src/lib/notifications/notifications.ts b/src/lib/notifications/notifications.ts index 53d0ae65b2..e23337a8c1 100644 --- a/src/lib/notifications/notifications.ts +++ b/src/lib/notifications/notifications.ts @@ -130,6 +130,8 @@ export function useGetAndRegisterPushToken() { }: { isAgeRestricted?: boolean } = {}) => { + if (!isNative) return + /** * This will also fire the listener added via `addPushTokenListener`. That * listener also handles registration. diff --git a/src/state/age-assurance/index.tsx b/src/state/age-assurance/index.tsx index d0d5104512..e3ef002b8e 100644 --- a/src/state/age-assurance/index.tsx +++ b/src/state/age-assurance/index.tsx @@ -13,6 +13,7 @@ import { type AgeAssuranceContextType, } from '#/state/age-assurance/types' import {useGeolocation} from '#/state/geolocation' +import {STALE} from '#/state/queries' import {useAgent} from '#/state/session' const logger = Logger.create(Logger.Context.AgeAssurance) @@ -50,6 +51,8 @@ export function Provider({children}: {children: React.ReactNode}) { */ enabled: true, queryKey: createAgeAssuranceQueryKey(agent.session?.did ?? 'never'), + staleTime: STALE.MINUTES.ONE, + refetchOnWindowFocus: true, async queryFn() { if (!agent.session) return null