Skip to content

Commit

Permalink
Merge pull request #11280 from brave/filter-out-erc721-from-fiat-balance
Browse files Browse the repository at this point in the history
Filtered out ERC721 tokens from Full Fiat Balance
  • Loading branch information
Douglashdaniel committed Dec 1, 2021
1 parent 874d15d commit a3e5632
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/brave_wallet_ui/page/container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,9 @@ function Container (props: Props) {

// This will scrape all of the user's accounts and combine the fiat value for every asset
const fullPortfolioBalance = React.useMemo(() => {
const amountList = userAssetList.map((item) => {
return item.asset.visible ? fullAssetFiatBalance(item.asset) !== '' ? fullAssetFiatBalance(item.asset) : undefined : 0
const filteredList = userAssetList.filter((token) => token.asset.visible && !token.asset.isErc721)
const amountList = filteredList.map((item) => {
return fullAssetFiatBalance(item.asset) !== '' ? fullAssetFiatBalance(item.asset) : undefined
})
if (amountList.length === 0) {
return ''
Expand Down

0 comments on commit a3e5632

Please sign in to comment.