import React from "react"; import { ethers } from "ethers"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faAngleRight, faBomb, faCoins, } from "@fortawesome/free-solid-svg-icons"; import AddressHighlighter from "./AddressHighlighter"; import AddressLink from "./AddressLink"; import { TransactionData, Transfer } from "../types"; type InternalSelfDestructProps = { txData: TransactionData; transfer: Transfer; }; const InternalSelfDestruct: React.FC = ({ txData, transfer, }) => { const fromMiner = txData.miner !== undefined && transfer.from === txData.miner; const toMiner = txData.miner !== undefined && transfer.to === txData.miner; return ( <>
{" "} SELF DESTRUCT Contract
{fromMiner && ( )}
{!transfer.value.isZero() && (
TRANSFER {ethers.utils.formatEther(transfer.value)} Ether
To
{toMiner && ( )}
)} ); }; export default React.memo(InternalSelfDestruct);