File tree Expand file tree Collapse file tree
mobile-app/app/screens/AppNavigator/screens/Portfolio Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ export function PortfolioScreen({ navigation }: Props): JSX.Element {
132132 const dispatch = useAppDispatch ( ) ;
133133 const [ refreshing , setRefreshing ] = useState ( false ) ;
134134 const [ isZeroBalance , setIsZeroBalance ] = useState ( true ) ;
135+ const [ isEvmZeroBalance , setIsEvmZeroBalance ] = useState ( true ) ;
135136 const { hasFetchedToken, allTokens } = useSelector (
136137 ( state : RootState ) => state . wallet ,
137138 ) ;
@@ -455,7 +456,10 @@ export function PortfolioScreen({ navigation }: Props): JSX.Element {
455456 setIsZeroBalance (
456457 ! tokens . some ( ( token ) => new BigNumber ( token . amount ) . isGreaterThan ( 0 ) ) ,
457458 ) ;
458- } , [ tokens ] ) ;
459+ setIsEvmZeroBalance (
460+ ! evmTokens . some ( ( token ) => new BigNumber ( token . amount ) . isGreaterThan ( 0 ) ) ,
461+ ) ;
462+ } , [ tokens , evmTokens ] ) ;
459463
460464 const assetSortBottomSheetScreen = useMemo ( ( ) => {
461465 return [
@@ -695,6 +699,7 @@ export function PortfolioScreen({ navigation }: Props): JSX.Element {
695699 ) : (
696700 < PortfolioCard
697701 isZeroBalance = { isZeroBalance }
702+ isEvmZeroBalance = { isEvmZeroBalance }
698703 filteredTokens = { sortTokensAssetOnType ( assetSortType ) }
699704 navigation = { navigation }
700705 buttonGroupOptions = { {
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import { EmptyEvmPortfolioIcon } from "../assets/EmptyEvmPortfolioIcon";
2222
2323interface PortfolioCardProps {
2424 isZeroBalance : boolean ;
25+ isEvmZeroBalance : boolean ;
2526 filteredTokens : PortfolioRowToken [ ] ;
2627 navigation : StackNavigationProp < PortfolioParamList > ;
2728 buttonGroupOptions ?: {
@@ -35,6 +36,7 @@ interface PortfolioCardProps {
3536
3637export function PortfolioCard ( {
3738 isZeroBalance,
39+ isEvmZeroBalance,
3840 filteredTokens,
3941 navigation,
4042 buttonGroupOptions,
@@ -44,7 +46,7 @@ export function PortfolioCard({
4446 const { hasFetchedToken } = useSelector ( ( state : RootState ) => state . wallet ) ;
4547 const { domain } = useDomainContext ( ) ;
4648 // return empty portfolio if no DFI and other tokens
47- if ( isZeroBalance ) {
49+ if ( ( isZeroBalance && ! isEvmDomain ) || ( isEvmZeroBalance && isEvmDomain ) ) {
4850 const screenDetails = getEmptyScreenDetails (
4951 ButtonGroupTabKey . AllTokens ,
5052 domain ,
You can’t perform that action at this time.
0 commit comments