From 65827d2ba1a549adc04907eec5374be198b259d5 Mon Sep 17 00:00:00 2001 From: JSoufer Date: Tue, 9 Jul 2024 14:01:34 +0100 Subject: [PATCH 1/2] chore: move SnapWebview out of Main navigation stack --- app/components/Nav/App/index.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/components/Nav/App/index.js b/app/components/Nav/App/index.js index f0316226cd3..79af8053345 100644 --- a/app/components/Nav/App/index.js +++ b/app/components/Nav/App/index.js @@ -6,7 +6,7 @@ import React, { useState, } from 'react'; import { CommonActions, NavigationContainer } from '@react-navigation/native'; -import { Animated, Linking } from 'react-native'; +import { Animated, Linking, View } from 'react-native'; import { createStackNavigator } from '@react-navigation/stack'; import Login from '../../Views/Login'; import QRScanner from '../../Views/QRScanner'; @@ -111,6 +111,9 @@ import DefaultSettings from '../../Views/OnboardingSuccess/DefaultSettings'; import BasicFunctionalityModal from '../../UI/BasicFunctionality/BasicFunctionalityModal/BasicFunctionalityModal'; import SmartTransactionsOptInModal from '../../Views/SmartTransactionsOptInModal/SmartTranactionsOptInModal'; import NFTAutoDetectionModal from '../../../../app/components/Views/NFTAutoDetectionModal/NFTAutoDetectionModal'; +///: BEGIN:ONLY_INCLUDE_IF(preinstalled-snaps,external-snaps) +import { SnapsExecutionWebView } from '../../../lib/snaps'; +///: END:ONLY_INCLUDE_IF const clearStackNavigatorOptions = { headerShown: false, @@ -771,6 +774,15 @@ const App = ({ userLoggedIn }) => { // do not render unless a route is defined (route && ( <> + { + ///: BEGIN:ONLY_INCLUDE_IF(preinstalled-snaps,external-snaps) + } + + + + { + ///: END:ONLY_INCLUDE_IF + } {isBlockaidFeatureEnabled() && } Date: Tue, 9 Jul 2024 14:09:35 +0100 Subject: [PATCH 2/2] chore: remove SnapWebview reference on this nav --- app/components/Nav/Main/index.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/components/Nav/Main/index.js b/app/components/Nav/Main/index.js index c51dd6e6ff3..d090218d381 100644 --- a/app/components/Nav/Main/index.js +++ b/app/components/Nav/Main/index.js @@ -81,9 +81,6 @@ import { startIncomingTransactionPolling, stopIncomingTransactionPolling, } from '../../../util/transaction-controller'; -///: BEGIN:ONLY_INCLUDE_IF(preinstalled-snaps,external-snaps) -import { SnapsExecutionWebView } from '../../../lib/snaps'; -///: END:ONLY_INCLUDE_IF const Stack = createStackNavigator(); @@ -365,15 +362,6 @@ const Main = (props) => { ) : ( renderLoader() )} - { - ///: BEGIN:ONLY_INCLUDE_IF(preinstalled-snaps,external-snaps) - } - - - - { - ///: END:ONLY_INCLUDE_IF - }