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