Review
This commit is contained in:
@@ -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 () => {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user