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 BlockConfirmations from "../components/BlockConfirmations"; import AddressHighlighter from "../components/AddressHighlighter"; import DecoratedAddressLink from "../components/DecoratedAddressLink"; import Copy from "../components/Copy"; import Timestamp from "../components/Timestamp"; import InternalTransactionOperation from "../components/InternalTransactionOperation"; import MethodName from "../components/MethodName"; import TransactionType from "../components/TransactionType"; import GasValue from "../components/GasValue"; import FormattedBalance from "../components/FormattedBalance"; import TokenTransferItem from "../TokenTransferItem"; import { TransactionData, InternalOperation } from "../types"; import PercentageBar from "../components/PercentageBar"; type DetailsProps = { txData: TransactionData; internalOps?: InternalOperation[]; sendsEthToMiner: boolean; }; const Details: React.FC = ({ txData, internalOps, sendsEthToMiner, }) => (
{txData.transactionHash}
{txData.status ? ( Success ) : ( Fail )}
{txData.to ? (
) : (
)} {internalOps && (
{internalOps.map((op, i) => ( ))}
)}
{txData.tokenTransfers.length > 0 && (
{txData.tokenTransfers.map((t, i) => ( ))}
)} {ethers.utils.formatEther(txData.value)} Ether {txData.blockBaseFeePerGas && ( {" "} Gwei ( {" "} wei) )} {txData.type === 2 && ( <> Ether ( {" "} Gwei) Ether ( Gwei) )} Ether
Ether ( Gwei) {sendsEthToMiner && ( Flashbots )}
/{" "}
N/A {txData.nonce} {txData.transactionIndex}