import React, { useContext } from 'react'; import PropTypes from 'prop-types'; import { I18nContext } from '../../../../contexts/i18n'; import { useCopyToClipboard } from '../../../../hooks/useCopyToClipboard'; import Box from '../../../ui/box'; import Button from '../../../ui/button'; import Typography from '../../../ui/typography'; import Tooltip from '../../../ui/tooltip'; import { COLORS, DISPLAY, TYPOGRAPHY, } from '../../../../helpers/constants/design-system'; import { shortenAddress } from '../../../../helpers/utils/util'; const DetectedTokenAddress = ({ address }) => { const t = useContext(I18nContext); const [copied, handleCopy] = useCopyToClipboard(); return ( {`${t('tokenAddress')}:`} {shortenAddress(address)} ); }; DetectedTokenAddress.propTypes = { address: PropTypes.string, }; export default DetectedTokenAddress;