mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-03 14:44:27 +01:00
925a19fa4a
This reverts commitf09ab88891
, reversing changes made toeffc761e0e
. This is being temporarily reverted to make it easier to release an urgent fix for v10.15.1.
42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
import React from 'react';
|
|
import { useSelector } from 'react-redux';
|
|
import PropTypes from 'prop-types';
|
|
|
|
import Box from '../../../ui/box';
|
|
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 = ({ tokenAddress }) => {
|
|
const tokenList = useSelector(getTokenList);
|
|
const token = tokenList[tokenAddress];
|
|
|
|
return (
|
|
<Box display={DISPLAY.FLEX} className="detected-token-details">
|
|
<Identicon
|
|
className="detected-token-details__identicon"
|
|
address={tokenAddress}
|
|
diameter={40}
|
|
/>
|
|
<Box
|
|
display={DISPLAY.GRID}
|
|
marginLeft={2}
|
|
className="detected-token-details__data"
|
|
>
|
|
<DetectedTokenValues token={token} />
|
|
<DetectedTokenAddress address={token.address} />
|
|
<DetectedTokenAggregators aggregatorsList={token.aggregators} />
|
|
</Box>
|
|
</Box>
|
|
);
|
|
};
|
|
|
|
DetectedTokenDetails.propTypes = {
|
|
tokenAddress: PropTypes.string,
|
|
};
|
|
|
|
export default DetectedTokenDetails;
|