Skip to content

Commit

Permalink
use external EE
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathansoufer committed Sep 6, 2024
1 parent 5f61c1c commit fbd883c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/lib/snaps/SnapsExecutionWebView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import { createStyles } from './styles';
import { WebViewInterface } from '@metamask/snaps-controllers/dist/types/services/webview/WebViewMessageStream';
import { WebViewError } from '@metamask/react-native-webview/lib/WebViewTypes';
import { PostMessageEvent } from '@metamask/post-message-stream';
// @ts-expect-error Can't type a distritibuted html file
import WebViewHTML from '@metamask/snaps-execution-environments/dist/browserify/webview/index.html';
const SNAPS_EE_URL = 'https://execution.metamask.io/webview/6.5.0/index.html';

const styles = createStyles();

Expand Down Expand Up @@ -89,11 +88,11 @@ export class SnapsExecutionWebView extends Component {
ref={
this.setWebViewRef as unknown as React.RefObject<WebView> | null
}
source={WebViewHTML}
source={{ uri: SNAPS_EE_URL }}
onMessage={this.onWebViewMessage}
onError={this.onWebViewError}
onLoadEnd={this.onWebViewLoad}
originWhitelist={['*']}
originWhitelist={['https://execution.metamask.io*']}
javaScriptEnabled
/>
</View>
Expand Down

0 comments on commit fbd883c

Please sign in to comment.