1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 11:01:41 +01:00
metamask-extension/ui/app/pages/asset/components/native-asset.js
Mark Stacey bb087e3749
Hide token transfers on ETH asset page (#8799)
Token transfers will now be hidden on the ETH asset page. Arguably
token transfers are still relevant to show on the ETH asset page
because the gas for token transfers is paid in ETH, but they weren't
being displayed in a way that highlighted this (only the token amount
was shown inline - not the gas price).

We will likely restore token transfers to the ETH asset page at a later
date, after designs have been updated to highlight their relevance to
this page.
2020-06-12 23:06:33 -03:00

33 lines
1018 B
JavaScript

import React from 'react'
import PropTypes from 'prop-types'
import { useSelector } from 'react-redux'
import { useHistory } from 'react-router-dom'
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'
import AssetNavigation from './asset-navigation'
export default function NativeAsset ({ nativeCurrency }) {
const selectedAccountName = useSelector((state) => getSelectedIdentity(state).name)
const history = useHistory()
return (
<>
<AssetNavigation
accountName={selectedAccountName}
assetName={nativeCurrency}
onBack={() => history.push(DEFAULT_ROUTE)}
/>
<EthOverview className="asset__overview" />
<TransactionList hideTokenTransactions />
</>
)
}
NativeAsset.propTypes = {
nativeCurrency: PropTypes.string.isRequired,
}