import classnames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; import { useSelector } from 'react-redux'; import AssetListItem from '../asset-list-item'; import { getSelectedAddress } from '../../../selectors'; import { useI18nContext } from '../../../hooks/useI18nContext'; import { useTokenFiatAmount } from '../../../hooks/useTokenFiatAmount'; export default function TokenCell({ address, decimals, balanceError, symbol, string, image, onClick, isERC721, }) { const userAddress = useSelector(getSelectedAddress); const t = useI18nContext(); const formattedFiat = useTokenFiatAmount(address, string, symbol); const warning = balanceError ? ( {t('troubleTokenBalances')} event.stopPropagation()} style={{ color: 'var(--color-warning-default)' }} > {t('here')} ) : null; return ( ); } TokenCell.propTypes = { address: PropTypes.string, balanceError: PropTypes.object, symbol: PropTypes.string, decimals: PropTypes.number, string: PropTypes.string, image: PropTypes.string, onClick: PropTypes.func.isRequired, isERC721: PropTypes.bool, }; TokenCell.defaultProps = { balanceError: null, };