[SDK] Validate and brand the persisted account did (#11387)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-08-13 22:26:22 +03:00
committed by GitHub
parent 9fe0084874
commit 3677c98873
46 changed files with 154 additions and 205 deletions
@@ -1,6 +1,5 @@
import {useCallback, useRef, useState} from 'react'
import {type TextInput, View} from 'react-native'
import {type DidString} from '@atproto/syntax'
import {msg} from '@lingui/core/macro'
import {useLingui} from '@lingui/react'
import {Trans} from '@lingui/react/macro'
@@ -126,8 +125,7 @@ function DeleteAccountDialogInner({
*/
await chatClient.call(chat.bsky.actor.deleteAccount)
await client.call(com.atproto.server.deleteAccount, {
// the persisted account did is already resolved
did: currentAccount.did as DidString,
did: currentAccount.did,
password,
token,
})
@@ -1,6 +1,5 @@
import {useCallback, useState} from 'react'
import {View} from 'react-native'
import {type DidString} from '@atproto/syntax'
import {Trans, useLingui} from '@lingui/react/macro'
import {saveBytesToDisk} from '#/lib/media/manip'
@@ -34,7 +33,7 @@ export function ExportCarDialog({
}
try {
setLoading('repo')
const did = currentAccount.did as DidString
const did = currentAccount.did
const data = await pdsClient.call(com.atproto.sync.getRepo, {did})
/*
* getRepo declares `application/vnd.ipld.car`, so lex-client hands back