From b86b1dceb6e06a6b3f3a7d3488fa3b05895c02b7 Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Sat, 19 Sep 2026 10:33:47 +0000 Subject: [PATCH] Fix Sentry noise from cancelled queries during logout --- hooks/usePostSignupInit.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hooks/usePostSignupInit.ts b/hooks/usePostSignupInit.ts index 0e8bdde6e..395120bde 100644 --- a/hooks/usePostSignupInit.ts +++ b/hooks/usePostSignupInit.ts @@ -1,14 +1,15 @@ -import * as Sentry from '@sentry/react-native'; import { useEffect, useRef } from 'react'; +import * as Sentry from '@sentry/react-native'; +import { isCancelledError, useQueryClient } from '@tanstack/react-query'; +import { useShallow } from 'zustand/react/shallow'; import { updateSafeAddress } from '@/lib/api'; import { User } from '@/lib/types'; import { withRefreshToken } from '@/lib/utils'; import { usePointsStore } from '@/store/usePointsStore'; import { useUserStore } from '@/store/useUserStore'; -import { useQueryClient } from '@tanstack/react-query'; + import { fetchIsDeposited } from './useAnalytics'; -import { useShallow } from 'zustand/react/shallow'; /** * Hook to handle post-signup/post-login initialization tasks that don't need to block @@ -77,6 +78,7 @@ export const usePostSignupInit = (user: User | undefined) => { }); } } catch (error) { + if (isCancelledError(error)) return; Sentry.captureException(error, { tags: { type: 'balance_check_error_lazy',