import React, { useContext } from 'react' import { AlertCircle, CheckCircle } from 'react-feather' import styled, { ThemeContext } from 'styled-components' import { useActiveWeb3React } from '../../hooks' import { TYPE } from '../../theme' import { ExternalLink } from '../../theme/components' import { getEtherscanLink } from '../../utils' import { AutoColumn } from '../Column' import { AutoRow } from '../Row' const RowNoFlex = styled(AutoRow)` flex-wrap: nowrap; ` export default function TransactionPopup({ hash, success, summary }: { hash: string success?: boolean summary?: string }) { const { chainId } = useActiveWeb3React() const theme = useContext(ThemeContext) return (
{success ? : }
{summary ?? 'Hash: ' + hash.slice(0, 8) + '...' + hash.slice(58, 65)} {chainId && ( View on Moonbeam explorer )}
) }