From e7fe77641e1c3f0deebf2eae0197751c753c175c Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Mon, 2 Dec 2024 13:21:47 +0800 Subject: [PATCH] replace canEditRecordsWhenWrapped with resolverStatus isAuthorized --- .../input/ProfileEditor/ProfileEditor-flow.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx index 8a8e72bc2..4f774c17b 100644 --- a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx +++ b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx @@ -181,6 +181,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr const resolverStatus = useResolverStatus({ name, }) + console.log('resolverStatus', resolverStatus) const chainId = useChainId() @@ -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