diff --git a/src/transaction/Trace.tsx b/src/transaction/Trace.tsx index 5a2a4f9..a04bcdb 100644 --- a/src/transaction/Trace.tsx +++ b/src/transaction/Trace.tsx @@ -24,12 +24,7 @@ const Trace: React.FC = ({ txData }) => {
{traces.map((t, i, a) => ( - + ))}
diff --git a/src/transaction/TraceInput.tsx b/src/transaction/TraceInput.tsx index 2ae54e9..c21adfc 100644 --- a/src/transaction/TraceInput.tsx +++ b/src/transaction/TraceInput.tsx @@ -13,14 +13,12 @@ import { useTransactionDescription, } from "../use4Bytes"; import { useChainInfo } from "../useChainInfo"; -import { TransactionData } from "../types"; type TraceInputProps = { t: TraceEntry; - txData: TransactionData; }; -const TraceInput: React.FC = ({ t, txData }) => { +const TraceInput: React.FC = ({ t }) => { const { nativeSymbol } = useChainInfo(); const raw4Bytes = extract4Bytes(t.input); const fourBytes = use4Bytes(raw4Bytes); diff --git a/src/transaction/TraceItem.tsx b/src/transaction/TraceItem.tsx index 5dd4a3d..d6a4d7d 100644 --- a/src/transaction/TraceItem.tsx +++ b/src/transaction/TraceItem.tsx @@ -5,15 +5,13 @@ import { faMinusSquare } from "@fortawesome/free-regular-svg-icons/faMinusSquare import { Switch } from "@headlessui/react"; import { TraceGroup } from "../useErigonHooks"; import TraceInput from "./TraceInput"; -import { TransactionData } from "../types"; type TraceItemProps = { t: TraceGroup; last: boolean; - txData: TransactionData; }; -const TraceItem: React.FC = ({ t, last, txData }) => { +const TraceItem: React.FC = ({ t, last }) => { const [expanded, setExpanded] = useState(true); return ( @@ -35,7 +33,7 @@ const TraceItem: React.FC = ({ t, last, txData }) => { /> )} - + {t.children && (
= ({ t, last, txData }) => { expanded ? "" : "hidden" }`} > - +
)} @@ -52,19 +50,16 @@ const TraceItem: React.FC = ({ t, last, txData }) => { type TraceChildrenProps = { c: TraceGroup[]; - txData: TransactionData; }; -const TraceChildren: React.FC = React.memo( - ({ c, txData }) => { - return ( - <> - {c.map((tc, i, a) => ( - - ))} - - ); - } -); +const TraceChildren: React.FC = React.memo(({ c }) => { + return ( + <> + {c.map((tc, i, a) => ( + + ))} + + ); +}); export default TraceItem;