import React from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faStar } from "@fortawesome/free-solid-svg-icons/faStar"; import { faBomb } from "@fortawesome/free-solid-svg-icons/faBomb"; import { faMoneyBillAlt } from "@fortawesome/free-solid-svg-icons/faMoneyBillAlt"; import { faBurn } from "@fortawesome/free-solid-svg-icons/faBurn"; import { faCoins } from "@fortawesome/free-solid-svg-icons/faCoins"; import TokenLogo from "./TokenLogo"; import AddressOrENSName from "./AddressOrENSName"; import { AddressContext, TokenMeta, ZERO_ADDRESS } from "../types"; type DecoratedAddressLinkProps = { address: string; ensName?: string; selectedAddress?: string; text?: string; addressCtx?: AddressContext; creation?: boolean; miner?: boolean; selfDestruct?: boolean; txFrom?: boolean; txTo?: boolean; tokenMeta?: TokenMeta; }; const DecoratedAddresssLink: React.FC = ({ address, ensName, selectedAddress, text, addressCtx, creation, miner, selfDestruct, txFrom, txTo, tokenMeta, }) => { const mint = addressCtx === AddressContext.FROM && address === ZERO_ADDRESS; const burn = addressCtx === AddressContext.TO && address === ZERO_ADDRESS; return (
{creation && ( )} {selfDestruct && ( )} {mint && ( )} {burn && ( )} {miner && ( )} {tokenMeta && (
)}
); }; export default React.memo(DecoratedAddresssLink);