From aa4463b59d95911708834b2a1ce8933329409b17 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 22 Jul 2025 10:14:54 -0500 Subject: [PATCH] Review --- .../dialogs/EmailDialog/data/useAccountEmailState.ts | 3 +++ src/state/session/reducer.ts | 10 +--------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/components/dialogs/EmailDialog/data/useAccountEmailState.ts b/src/components/dialogs/EmailDialog/data/useAccountEmailState.ts index 87bd091fb1..f25369f8db 100644 --- a/src/components/dialogs/EmailDialog/data/useAccountEmailState.ts +++ b/src/components/dialogs/EmailDialog/data/useAccountEmailState.ts @@ -30,6 +30,9 @@ export function useAccountEmailState() { */ useQuery({ enabled: !!agent.session, + /** + * Only refetch if the email verification s incomplete. + */ refetchOnWindowFocus: !prevIsEmailVerified, queryKey: accountEmailStateQueryKey, queryFn: async () => { diff --git a/src/state/session/reducer.ts b/src/state/session/reducer.ts index 55ef85aaf3..f6452a3915 100644 --- a/src/state/session/reducer.ts +++ b/src/state/session/reducer.ts @@ -52,18 +52,10 @@ export type Action = syncedAccounts: SessionAccount[] syncedCurrentDid: string | undefined } - | { - type: 'synced-accounts' - syncedAccounts: SessionAccount[] - syncedCurrentDid: string | undefined - } | { type: 'partial-refresh-session' accountDid: string - patch: Pick< - SessionAccount, - 'emailConfirmed' | 'emailAuthFactor' | 'email' - > + patch: Pick } function createPublicAgentState(): AgentState {