import React from "react"; import { ethers } from "ethers"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faCheckCircle, faCube, faTimesCircle, } from "@fortawesome/free-solid-svg-icons"; import ContentFrame from "../ContentFrame"; import InfoRow from "../components/InfoRow"; import BlockLink from "../components/BlockLink"; import BlockConfirmations from "../components/BlockConfirmations"; import AddressHighlighter from "../components/AddressHighlighter"; import DecoratedAddressLink from "../components/DecoratedAddressLink"; import Copy from "../components/Copy"; import Nonce from "../components/Nonce"; import Timestamp from "../components/Timestamp"; import InternalTransactionOperation from "../components/InternalTransactionOperation"; import MethodName from "../components/MethodName"; import TransactionType from "../components/TransactionType"; import RewardSplit from "./RewardSplit"; import GasValue from "../components/GasValue"; import FormattedBalance from "../components/FormattedBalance"; import TokenTransferItem from "../TokenTransferItem"; import { TransactionData, InternalOperation } from "../types"; import PercentageBar from "../components/PercentageBar"; import ExternalLink from "../components/ExternalLink"; import RelativePosition from "../components/RelativePosition"; import PercentagePosition from "../components/PercentagePosition"; type DetailsProps = { txData: TransactionData; internalOps?: InternalOperation[]; sendsEthToMiner: boolean; }; const Details: React.FC = ({ txData, internalOps, sendsEthToMiner, }) => { const hasEIP1559 = txData.blockBaseFeePerGas !== undefined && txData.blockBaseFeePerGas !== null; return (
{txData.transactionHash}
{txData.status ? ( Success ) : ( Fail )}
{txData.to ? (
) : (
)} {internalOps && internalOps.length > 0 && (
{internalOps.map((op, i) => ( ))}
)}
{txData.tokenTransfers.length > 0 && (
{txData.tokenTransfers.map((t, i) => ( ))}
)} {ethers.utils.formatEther(txData.value)} Ether Type ( EIP-2718 ) } > {txData.type === 2 && ( <> Ether ( {" "} Gwei) Ether ( {" "} Gwei) )}
Ether ( Gwei) {sendsEthToMiner && ( Flashbots )}
} total={} />
{hasEIP1559 && ( {" "} Gwei ( {" "} wei) )}
Ether
{hasEIP1559 && }
N/A