import React from "react"; import { QueryPreservingLink } from "src/services/network/networkProvider"; import { OverlayTrigger, Tooltip } from "react-bootstrap"; import { hexAddrToZilAddr, zilAddrToHexAddr, stripHexPrefix, } from "src/utils/Utils"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faFileContract } from "@fortawesome/free-solid-svg-icons"; const ToAddrDispSimplified: any = ({ toAddr, txType, addr }: any) => { const hexAddr = stripHexPrefix(zilAddrToHexAddr(addr)); let txTypeIcon: any = undefined; if (txType === "contract-creation") { txTypeIcon = ( ); } if (txType === "contract-call") { txTypeIcon = ; } return ( {txType}} >
{txTypeIcon ?
{txTypeIcon}
: null} {txType === "contract-creation" ? (
Contract
) : toAddr.toLowerCase() !== hexAddr ? ( {hexAddrToZilAddr(toAddr)} ) : ( {addr} )}
); }; export default ToAddrDispSimplified;