Skip to content

Commit

Permalink
replace canEditRecordsWhenWrapped with resolverStatus isAuthorized
Browse files Browse the repository at this point in the history
  • Loading branch information
storywithoutend committed Dec 2, 2024
1 parent 3f4d56a commit e7fe776
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr
const resolverStatus = useResolverStatus({
name,
})
console.log('resolverStatus', resolverStatus)

const chainId = useChainId()

Expand Down Expand Up @@ -233,11 +234,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr
setView('addRecord')
}

const canEditRecordsWhenWrapped = match(isWrapped)
.with(true, () =>
getResolverWrapperAwareness({ chainId, resolverAddress: profile?.resolverAddress }),
)
.otherwise(() => true)
const canEditRecordsWhenWrapped = !!resolverStatus.data?.isAuthorized

if (isLoading || resolverStatus.isLoading || !isRecordsUpdated) return <TransactionLoader />

Expand Down

0 comments on commit e7fe776

Please sign in to comment.