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 {