import React from 'react'; import PropTypes from 'prop-types'; import { checksumAddress } from '../../../helpers/utils/util'; import Identicon from '../../ui/identicon'; import AccountMismatchWarning from '../../ui/account-mismatch-warning/account-mismatch-warning.component'; export default function AccountListItem({ account, className, displayAddress = false, handleClick, icon = null, }) { const { name, address, balance } = account || {}; return (
handleClick?.({ name, address, balance })} >
{name || address}
{icon &&
{icon}
}
{displayAddress && name && (
{checksumAddress(address)}
)}
); } AccountListItem.propTypes = { account: PropTypes.object, className: PropTypes.string, displayAddress: PropTypes.bool, handleClick: PropTypes.func, icon: PropTypes.node, };