Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move SnapsExecutionWebView out of Main navigation stack #10268

Merged
merged 3 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion app/components/Nav/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -771,6 +774,15 @@ const App = ({ userLoggedIn }) => {
// do not render unless a route is defined
(route && (
<>
{
///: BEGIN:ONLY_INCLUDE_IF(preinstalled-snaps,external-snaps)
}
<View>
<SnapsExecutionWebView />
</View>
{
///: END:ONLY_INCLUDE_IF
}
{isBlockaidFeatureEnabled() && <PPOMView />}
<NavigationContainer
// Prevents artifacts when navigating between screens
Expand Down
12 changes: 0 additions & 12 deletions app/components/Nav/Main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -365,15 +362,6 @@ const Main = (props) => {
) : (
renderLoader()
)}
{
///: BEGIN:ONLY_INCLUDE_IF(preinstalled-snaps,external-snaps)
}
<View>
<SnapsExecutionWebView />
</View>
{
///: END:ONLY_INCLUDE_IF
}
<GlobalAlert />
<FadeOutOverlay />
<Notification navigation={props.navigation} />
Expand Down
Loading