From 7386398b602abd0e709168c74bd17ce6dc43cc07 Mon Sep 17 00:00:00 2001 From: Micaela Estabillo Date: Wed, 18 Sep 2024 13:14:08 +0800 Subject: [PATCH] chore: hide MM header in bridge page --- .../create-account/connect-hardware/index.test.tsx | 4 ++++ ui/pages/routes/routes.component.js | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/ui/pages/create-account/connect-hardware/index.test.tsx b/ui/pages/create-account/connect-hardware/index.test.tsx index 6e0d2627d4aa..0b8585fd0b5c 100644 --- a/ui/pages/create-account/connect-hardware/index.test.tsx +++ b/ui/pages/create-account/connect-hardware/index.test.tsx @@ -30,6 +30,10 @@ jest.mock('../../../selectors', () => ({ }, })); +jest.mock('../../../ducks/bridge/selectors', () => ({ + getAllBridgeableNetworks: () => [], +})); + const MOCK_RECENT_PAGE = '/home'; jest.mock('../../../ducks/history/history', () => ({ getMostRecentOverviewPage: jest diff --git a/ui/pages/routes/routes.component.js b/ui/pages/routes/routes.component.js index 25c41ca37c82..14aa76d38bcc 100644 --- a/ui/pages/routes/routes.component.js +++ b/ui/pages/routes/routes.component.js @@ -515,6 +515,17 @@ export default class Routes extends Component { hideAppHeader() { const { location } = this.props; + const isCrossChainSwapsPage = Boolean( + matchPath(location.pathname, { + path: `${CROSS_CHAIN_SWAP_ROUTE}`, + exact: false, + }), + ); + + if (isCrossChainSwapsPage) { + return true; + } + const isNotificationsPage = Boolean( matchPath(location.pathname, { path: `${NOTIFICATIONS_ROUTE}`,