diff --git a/src/ui/views/Approval/components/CommonAction.tsx b/src/ui/views/Approval/components/CommonAction.tsx index e61d8f52d14..11b9efab4ce 100644 --- a/src/ui/views/Approval/components/CommonAction.tsx +++ b/src/ui/views/Approval/components/CommonAction.tsx @@ -20,6 +20,7 @@ type CommonActions = { is_asset_changed: boolean; is_involving_privacy: boolean; receiver?: string; + from?: string; }; export const CommonAction = ({ @@ -60,7 +61,14 @@ export const CommonAction = ({ dispatch.securityEngine.init(); }, []); - const addressInfo = (requireData as ContractCallRequireData).unexpectedAddr; + const addressInfo = requireData + ? (requireData as ContractCallRequireData).unexpectedAddr + : undefined; + + const hasReceiver = useMemo(() => { + if (!actionData.receiver || !actionData.from) return false; + return !isSameAddress(actionData.receiver, actionData.from); + }, [actionData]); return (