import React from 'react'; import PropTypes from 'prop-types'; import { useSelector } from 'react-redux'; import { Box } from '../../../component-library'; import Identicon from '../../../ui/identicon'; import DetectedTokenValues from '../detected-token-values/detected-token-values'; import DetectedTokenAddress from '../detected-token-address/detected-token-address'; import DetectedTokenAggregators from '../detected-token-aggregators/detected-token-aggregators'; import { Display } from '../../../../helpers/constants/design-system'; import { getTokenList } from '../../../../selectors'; const DetectedTokenDetails = ({ token, handleTokenSelection, tokensListDetected, }) => { const tokenList = useSelector(getTokenList); const tokenData = tokenList[token.address?.toLowerCase()]; return ( {tokenData?.aggregators.length > 0 && ( )} ); }; DetectedTokenDetails.propTypes = { token: PropTypes.shape({ address: PropTypes.string.isRequired, decimals: PropTypes.number, symbol: PropTypes.string, iconUrl: PropTypes.string, aggregators: PropTypes.array, }), handleTokenSelection: PropTypes.func.isRequired, tokensListDetected: PropTypes.object, }; export default DetectedTokenDetails;