From 8def68e2c9e6315e9acda40a39d767366a93b611 Mon Sep 17 00:00:00 2001 From: Nick Gambino <35090461+gambinish@users.noreply.github.com> Date: Wed, 4 Dec 2024 23:57:42 +0000 Subject: [PATCH] chore(runway): cherry-pick fix: Move `AssetPollingProvider` from Root to Nav/Main/index.js (#12562) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Picks `AssetPollingProvider` diff from https://github.com/MetaMask/metamask-mobile/pull/12538/files bug fix to isolate changes. ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [x] 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). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] 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. --- app/components/Nav/Main/index.js | 61 ++++++++++++++++-------------- app/components/Views/Root/index.js | 9 ++--- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/app/components/Nav/Main/index.js b/app/components/Nav/Main/index.js index 8d463aae71b..0ff9ee33f51 100644 --- a/app/components/Nav/Main/index.js +++ b/app/components/Nav/Main/index.js @@ -82,6 +82,7 @@ import { } from '../../../util/transaction-controller'; import isNetworkUiRedesignEnabled from '../../../util/networks/isNetworkUiRedesignEnabled'; import { useConnectionHandler } from '../../../util/navigation/useConnectionHandler'; +import { AssetPollingProvider } from '../../hooks/AssetPolling/AssetPollingProvider'; const Stack = createStackNavigator(); @@ -362,35 +363,37 @@ const Main = (props) => { return ( - - {!forceReload ? ( - - ) : ( - renderLoader() - )} - - - - - - - {renderDeprecatedNetworkAlert( - props.chainId, - props.backUpSeedphraseVisible, - )} - - - - + + + {!forceReload ? ( + + ) : ( + renderLoader() + )} + + + + + + + {renderDeprecatedNetworkAlert( + props.chainId, + props.backUpSeedphraseVisible, + )} + + + + + ); }; diff --git a/app/components/Views/Root/index.js b/app/components/Views/Root/index.js index 05a52cb033b..7ffa81485d3 100644 --- a/app/components/Views/Root/index.js +++ b/app/components/Views/Root/index.js @@ -12,7 +12,6 @@ import { useAppTheme, ThemeContext } from '../../../util/theme'; import { ToastContextWrapper } from '../../../component-library/components/Toast'; import { SafeAreaProvider } from 'react-native-safe-area-context'; import { isTest } from '../../../util/test/utils'; -import { AssetPollingProvider } from '../../hooks/AssetPolling/AssetPollingProvider'; /** * Top level of the component hierarchy @@ -86,11 +85,9 @@ const ConnectedRoot = () => { - - - - - + + +