import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { useSelector } from 'react-redux'; import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; import { getSelectedIdentity } from '../../../selectors'; import { AddressCopyButton } from '../../multichain'; const WalletOverview = ({ balance, buttons, className, icon, loading }) => { const selectedIdentity = useSelector(getSelectedIdentity); const checksummedAddress = toChecksumHexAddress(selectedIdentity?.address); return (
{process.env.MULTICHAIN ? ( ) : ( <>{loading ? null : icon} )} {balance}
{buttons}
); }; WalletOverview.propTypes = { balance: PropTypes.element.isRequired, buttons: PropTypes.element.isRequired, className: PropTypes.string, icon: PropTypes.element.isRequired, loading: PropTypes.bool, }; WalletOverview.defaultProps = { className: undefined, }; export default WalletOverview;