Skip to content

Commit

Permalink
remove params not needed on useVerifiedRecords
Browse files Browse the repository at this point in the history
  • Loading branch information
storywithoutend committed Aug 21, 2024
1 parent b2fafac commit a4c0944
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions src/components/pages/profile/[name]/tabs/ProfileTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ const ProfileTab = ({ nameDetails, name }: Props) => {
})

const { data: verifiedData, appendVerificationProps } = useVerifiedRecords({
name: normalisedName,
address: owners?.find(({ label }) => ['name.owner', 'name.dnsOwner'].includes(label))?.address,
verificationsRecord: profile?.texts?.find(({ key }) => key === VERIFICATION_RECORD_KEY)?.value,
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import {
} from './utils/parseVerificationData/parseVerificationData'

type UseVerifiedRecordsParameters = {
name?: string
address?: string
verificationsRecord?: string
}

Expand Down Expand Up @@ -76,7 +74,7 @@ export const useVerifiedRecords = <TParams extends UseVerifiedRecordsParameters>
const preparedOptions = prepareQueryOptions({
queryKey: initialOptions.queryKey,
queryFn: initialOptions.queryFn,
enabled: enabled && !!params.name && !!params.address && !!params.verificationsRecord,
enabled: enabled && !!params.verificationsRecord,
gcTime,
staleTime,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ const VerifyProfile = ({ data: { name }, dispatch, onDismiss }: Props) => {
const { address } = useAccount()

const { data: verificationData, isLoading: isVerificationLoading } = useVerifiedRecords({
name,
address: profile?.coins?.find(({ id }) => id === 60)?.value,
verificationsRecord: profile?.texts?.find(({ key }) => key === VERIFICATION_RECORD_KEY)?.value,
})

Expand Down

0 comments on commit a4c0944

Please sign in to comment.