This commit is contained in:
Eric Bailey
2025-07-22 10:14:54 -05:00
parent 3ba15befa8
commit aa4463b59d
2 changed files with 4 additions and 9 deletions
@@ -30,6 +30,9 @@ export function useAccountEmailState() {
*/ */
useQuery({ useQuery({
enabled: !!agent.session, enabled: !!agent.session,
/**
* Only refetch if the email verification s incomplete.
*/
refetchOnWindowFocus: !prevIsEmailVerified, refetchOnWindowFocus: !prevIsEmailVerified,
queryKey: accountEmailStateQueryKey, queryKey: accountEmailStateQueryKey,
queryFn: async () => { queryFn: async () => {
+1 -9
View File
@@ -52,18 +52,10 @@ export type Action =
syncedAccounts: SessionAccount[] syncedAccounts: SessionAccount[]
syncedCurrentDid: string | undefined syncedCurrentDid: string | undefined
} }
| {
type: 'synced-accounts'
syncedAccounts: SessionAccount[]
syncedCurrentDid: string | undefined
}
| { | {
type: 'partial-refresh-session' type: 'partial-refresh-session'
accountDid: string accountDid: string
patch: Pick< patch: Pick<SessionAccount, 'emailConfirmed' | 'emailAuthFactor'>
SessionAccount,
'emailConfirmed' | 'emailAuthFactor' | 'email'
>
} }
function createPublicAgentState(): AgentState { function createPublicAgentState(): AgentState {