mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Don't use concatenized token value for ETH in asset list item (#9809)
This commit is contained in:
parent
3dbf5dbf65
commit
b1b78ff5a5
@ -96,7 +96,7 @@ const AssetListItem = ({
|
||||
<button
|
||||
className="asset-list-item__token-button"
|
||||
onClick={onClick}
|
||||
title={`${primary} ${tokenSymbol || ''}`}
|
||||
title={`${primary} ${tokenSymbol}`}
|
||||
>
|
||||
<h2>
|
||||
<span className="asset-list-item__token-value">{primary}</span>
|
||||
|
@ -47,10 +47,13 @@ const AssetList = ({ onClickAsset }) => {
|
||||
numberOfDecimals: secondaryNumberOfDecimals,
|
||||
} = useUserPreferencedCurrency(SECONDARY, { ethNumberOfDecimals: 4 })
|
||||
|
||||
const [primaryCurrencyDisplay] = useCurrencyDisplay(selectedAccountBalance, {
|
||||
numberOfDecimals: primaryNumberOfDecimals,
|
||||
currency: primaryCurrency,
|
||||
})
|
||||
const [, primaryCurrencyProperties] = useCurrencyDisplay(
|
||||
selectedAccountBalance,
|
||||
{
|
||||
numberOfDecimals: primaryNumberOfDecimals,
|
||||
currency: primaryCurrency,
|
||||
},
|
||||
)
|
||||
|
||||
const [secondaryCurrencyDisplay] = useCurrencyDisplay(
|
||||
selectedAccountBalance,
|
||||
@ -65,7 +68,8 @@ const AssetList = ({ onClickAsset }) => {
|
||||
<AssetListItem
|
||||
onClick={() => onClickAsset(nativeCurrency)}
|
||||
data-testid="wallet-balance"
|
||||
primary={primaryCurrencyDisplay}
|
||||
primary={primaryCurrencyProperties.value}
|
||||
tokenSymbol={primaryCurrencyProperties.suffix}
|
||||
secondary={showFiat ? secondaryCurrencyDisplay : undefined}
|
||||
/>
|
||||
<TokenList
|
||||
|
Loading…
Reference in New Issue
Block a user