import React from "react"; import AddressHighlighter from "../components/AddressHighlighter"; import DecoratedAddressLink from "../components/DecoratedAddressLink"; import Copy from "../components/Copy"; import { ParamType } from "@ethersproject/abi"; import { TransactionData } from "../types"; type DecodedParamRowProps = { i?: number | undefined; r: any; paramType: ParamType; txData: TransactionData; }; const DecodedParamRow: React.FC = ({ i, r, paramType, txData, }) => { return ( {paramType.name}{" "} {i !== undefined && ( ({i}) )} {paramType.type} {paramType.type === "address" ? (
) : paramType.type === "bool" ? ( {r.toString()} ) : paramType.type === "bytes" ? ( {r.toString()}{" "} {r.toString().length / 2 - 1}{" "} {r.toString().length / 2 - 1 === 1 ? "byte" : "bytes"} ) : ( r.toString() )} ); }; export default React.memo(DecodedParamRow);