From 8b61b2f357359b788457c7f4d80580708957cb1f Mon Sep 17 00:00:00 2001 From: Harsh R <53080940+fullstackninja864@users.noreply.github.com> Date: Wed, 18 Oct 2023 13:59:38 +0530 Subject: [PATCH] fix(core): fixed hang issue on click of denomination currency (#4072) --- .../screens/Portfolio/hooks/TokenBalance.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/hooks/TokenBalance.ts b/mobile-app/app/screens/AppNavigator/screens/Portfolio/hooks/TokenBalance.ts index 0207aa6f07..528ccbf7f7 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/hooks/TokenBalance.ts +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/hooks/TokenBalance.ts @@ -1,14 +1,9 @@ import { useSelector } from "react-redux"; import BigNumber from "bignumber.js"; import { RootState } from "@store"; -import { - WalletToken, - dexPricesSelectorByDenomination, - tokensSelector, -} from "@waveshq/walletkit-ui/dist/store"; +import { WalletToken, tokensSelector } from "@waveshq/walletkit-ui/dist/store"; import { useMemo } from "react"; import { DomainType } from "@contexts/DomainContext"; -import { useDenominationCurrency } from "./PortfolioCurrency"; import { useEvmTokenBalances } from "./EvmTokenBalances"; export interface DomainToken { @@ -30,14 +25,9 @@ export function useTokenBalance(): { dvmTokens: DomainToken[]; evmTokens: DomainToken[]; } { - const { denominationCurrency } = useDenominationCurrency(); - const tokens = useSelector((state: RootState) => tokensSelector(state.wallet), ); - const prices = useSelector((state: RootState) => - dexPricesSelectorByDenomination(state.wallet, denominationCurrency), - ); const { evmTokens } = useEvmTokenBalances(); const mapDomainToken = (token: WalletToken) => { @@ -94,7 +84,7 @@ export function useTokenBalance(): { dvmTokens: [], }, ); - }, [prices, tokens]); + }, [tokens]); return { dvmTokens,