From 5ed86bb080fe8d7a98e64c8c061aec6d7fad18b2 Mon Sep 17 00:00:00 2001 From: Kylan Hurt Date: Fri, 8 Nov 2024 17:00:33 -0500 Subject: [PATCH] fix: Kylan/7.35.0 e446dc1 cherry pick (#12249) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. Co-authored-by: sahar-fehri --- app/components/Views/Wallet/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/components/Views/Wallet/index.tsx b/app/components/Views/Wallet/index.tsx index a188ebb5340..5f04c86d930 100644 --- a/app/components/Views/Wallet/index.tsx +++ b/app/components/Views/Wallet/index.tsx @@ -99,6 +99,7 @@ import { useAccountSyncing } from '../../../util/notifications/hooks/useAccountS import { PortfolioBalance } from '../../UI/Tokens/TokenList/PortfolioBalance'; import useCheckNftAutoDetectionModal from '../../hooks/useCheckNftAutoDetectionModal'; import useCheckMultiRpcModal from '../../hooks/useCheckMultiRpcModal'; +import { selectContractBalances } from '../../../selectors/tokenBalancesController'; const createStyles = ({ colors, typography }: Theme) => StyleSheet.create({ @@ -182,6 +183,7 @@ const Wallet = ({ * ETH to current currency conversion rate */ const conversionRate = useSelector(selectConversionRate); + const contractBalances = useSelector(selectContractBalances); /** * Currency code of the currently-active currency */ @@ -589,6 +591,7 @@ const Wallet = ({ ); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [ tokens, accountBalanceByChainId, @@ -604,6 +607,7 @@ const Wallet = ({ ticker, conversionRate, currentCurrency, + contractBalances, ]); const renderLoader = useCallback( () => (