2021-02-04 19:15:23 +01:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { useSelector } from 'react-redux';
|
|
|
|
import { useHistory } from 'react-router-dom';
|
2020-06-12 19:04:40 +02:00
|
|
|
|
2021-02-04 19:15:23 +01:00
|
|
|
import TransactionList from '../../../components/app/transaction-list';
|
|
|
|
import { EthOverview } from '../../../components/app/wallet-overview';
|
|
|
|
import { getSelectedIdentity } from '../../../selectors/selectors';
|
|
|
|
import { DEFAULT_ROUTE } from '../../../helpers/constants/routes';
|
2020-06-12 19:04:40 +02:00
|
|
|
|
2021-02-04 19:15:23 +01:00
|
|
|
import AssetNavigation from './asset-navigation';
|
2020-06-12 19:04:40 +02:00
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
export default function NativeAsset({ nativeCurrency }) {
|
|
|
|
const selectedAccountName = useSelector(
|
|
|
|
(state) => getSelectedIdentity(state).name,
|
2021-02-04 19:15:23 +01:00
|
|
|
);
|
|
|
|
const history = useHistory();
|
2020-06-12 19:04:40 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<AssetNavigation
|
|
|
|
accountName={selectedAccountName}
|
|
|
|
assetName={nativeCurrency}
|
|
|
|
onBack={() => history.push(DEFAULT_ROUTE)}
|
|
|
|
/>
|
|
|
|
<EthOverview className="asset__overview" />
|
2020-06-13 04:06:33 +02:00
|
|
|
<TransactionList hideTokenTransactions />
|
2020-06-12 19:04:40 +02:00
|
|
|
</>
|
2021-02-04 19:15:23 +01:00
|
|
|
);
|
2020-06-12 19:04:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
NativeAsset.propTypes = {
|
|
|
|
nativeCurrency: PropTypes.string.isRequired,
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|