import React from "react"; import { ethers } from "ethers"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faCheckCircle, faTimesCircle, } from "@fortawesome/free-solid-svg-icons"; import ContentFrame from "../ContentFrame"; import InfoRow from "../components/InfoRow"; import BlockLink from "../components/BlockLink"; import AddressHighlighter from "../components/AddressHighlighter"; import DecoratedAddressLink from "../components/DecoratedAddressLink"; import Copy from "../components/Copy"; import Timestamp from "../components/Timestamp"; import InternalTransfer from "../components/InternalTransfer"; import InternalSelfDestruct from "../components/InternalSelfDestruct"; import MethodName from "../components/MethodName"; import GasValue from "../components/GasValue"; import FormattedBalance from "../components/FormattedBalance"; import TokenTransferItem from "../TokenTransferItem"; import { InternalTransfers, TransactionData } from "../types"; type DetailsProps = { txData: TransactionData; internalTransfers?: InternalTransfers; sendsEthToMiner: boolean; }; const Details: React.FC = ({ txData, internalTransfers, sendsEthToMiner, }) => (
{txData.transactionHash}
{txData.status ? ( Success ) : ( Fail )}
{txData.confirmations} Block Confirmations
{internalTransfers && (
{internalTransfers.transfers.map((t, i) => ( ))} {internalTransfers.selfDestructs.map((t, i) => ( ))}
)}
{txData.tokenTransfers.length > 0 && (
{txData.tokenTransfers.map((t, i) => ( ))}
)} {ethers.utils.formatEther(txData.value)} Ether Ether
Ether ( Gwei) {sendsEthToMiner && ( Flashbots )}
N/A ( {(txData.gasUsedPerc * 100).toFixed(2)}%) {txData.nonce} {txData.transactionIndex}