import React from "react"; import { rawInputTo4Bytes, use4Bytes } from "../use4Bytes"; type MethodNameProps = { data: string; }; const MethodName: React.FC = ({ data }) => { const rawFourBytes = rawInputTo4Bytes(data); const fourBytesEntry = use4Bytes(rawFourBytes); const methodName = fourBytesEntry?.name ?? rawFourBytes; const isSimpleTransfer = rawFourBytes === "0x"; const methodTitle = isSimpleTransfer ? "ETH Transfer" : methodName === rawFourBytes ? methodName : `${methodName} [${rawFourBytes}]`; return (

{methodName}

); }; export default React.memo(MethodName);