[SDK] Migrate the account surface to the pds and service clients (#11367)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-08-13 22:26:17 +03:00
committed by GitHub
parent f5c166a055
commit 34d1c75756
16 changed files with 148 additions and 88 deletions
@@ -1,13 +1,14 @@
import {useMutation} from '@tanstack/react-query'
import {useAgent} from '#/state/session'
import {usePdsClient} from '#/state/session'
import {com} from '#/lexicons'
export function useRequestEmailUpdate() {
const agent = useAgent()
const client = usePdsClient()
return useMutation({
mutationFn: async () => {
return (await agent.com.atproto.server.requestEmailUpdate()).data
return await client.call(com.atproto.server.requestEmailUpdate)
},
})
}
@@ -1,13 +1,14 @@
import {useMutation} from '@tanstack/react-query'
import {useAgent} from '#/state/session'
import {usePdsClient} from '#/state/session'
import {com} from '#/lexicons'
export function useRequestEmailVerification() {
const agent = useAgent()
const client = usePdsClient()
return useMutation({
mutationFn: async () => {
await agent.com.atproto.server.requestEmailConfirmation()
await client.call(com.atproto.server.requestEmailConfirmation)
},
})
}