Don't use concatenized token value for ETH in asset list item (#9809)

feature/default_network_editable
David Walsh 4 years ago committed by GitHub
parent 3dbf5dbf65
commit b1b78ff5a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ui/app/components/app/asset-list-item/asset-list-item.js
  2. 14
      ui/app/components/app/asset-list/asset-list.js

@ -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…
Cancel
Save