Skip to content

Commit

Permalink
remove token filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoncalves committed Feb 9, 2024
1 parent 7b116fa commit 935f575
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
9 changes: 0 additions & 9 deletions src/components/token/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,3 @@ export const sortTokensBySymbol = (
}
return 0
}

// note that RDOC is not a default token
// which means it can be hidden if its balance is 0
export const isDefaultToken = (symbol: string) =>
symbol === TokenSymbol.RIF ||
symbol === TokenSymbol.TRIF ||
symbol === TokenSymbol.USDRIF ||
symbol === TokenSymbol.RBTC ||
symbol === TokenSymbol.BTC
5 changes: 1 addition & 4 deletions src/screens/home/PortfolioComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'
import { ScrollView, StyleProp, View, ViewStyle } from 'react-native'

import { PortfolioCard } from 'components/Porfolio/PortfolioCard'
import { isDefaultToken, sortTokensBySymbol } from 'components/token/utils'
import { sortTokensBySymbol } from 'components/token/utils'
import { getTokenColor } from 'screens/home/tokenColor'
import { sharedColors } from 'shared/constants'
import { TokenOrBitcoinNetwork } from 'shared/types'
Expand Down Expand Up @@ -61,9 +61,6 @@ export const PortfolioComponent = ({
)}
{balances
.sort(sortTokensBySymbol)
.filter(
token => isDefaultToken(token.symbol) || Number(token.balance) > 0,
)
.map(
(
{ contractAddress, symbol, balance }: TokenOrBitcoinNetwork,
Expand Down

0 comments on commit 935f575

Please sign in to comment.