[SDK] Validate and brand the persisted account did (#11387)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import {useState} from 'react'
|
||||
import {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'
|
||||
@@ -62,8 +61,7 @@ function Inner({control}: {control: Dialog.DialogControlProps}) {
|
||||
reasonType: tools.ozone.report.defs.reasonAppeal.value,
|
||||
subject: {
|
||||
$type: 'com.atproto.admin.defs#repoRef',
|
||||
// the persisted account did is already resolved
|
||||
did: currentAccount.did as DidString,
|
||||
did: currentAccount.did,
|
||||
},
|
||||
reason: `AGE_ASSURANCE_INQUIRY: ` + details,
|
||||
},
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
import {View} from 'react-native'
|
||||
import {TID} from '@atproto/common-web'
|
||||
import {type $Typed} from '@atproto/lex'
|
||||
import {
|
||||
type AtIdentifierString,
|
||||
AtUri,
|
||||
type AtUriString,
|
||||
toDatetimeString,
|
||||
} from '@atproto/syntax'
|
||||
import {AtUri, type AtUriString, toDatetimeString} from '@atproto/syntax'
|
||||
import {msg} from '@lingui/core/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {Trans} from '@lingui/react/macro'
|
||||
@@ -99,7 +94,7 @@ export function CreateListFromStarterPackDialog({
|
||||
const chunks = chunk(listitemWrites, 50)
|
||||
for (const c of chunks) {
|
||||
await pdsClient.call(com.atproto.repo.applyWrites, {
|
||||
repo: currentAccount.did as AtIdentifierString,
|
||||
repo: currentAccount.did,
|
||||
writes: c,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ export function useSubmitReportMutation() {
|
||||
reason: state.details,
|
||||
subject: {
|
||||
$type: 'com.atproto.admin.defs#repoRef',
|
||||
// the parsed subject carries an already-resolved did
|
||||
// the parsed subject holds the did as a plain string
|
||||
did: subject.did as DidString,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user