Skip to content

Commit

Permalink
fix: switch from bundled to url EE (#11176)
Browse files Browse the repository at this point in the history
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This is a simple yet important change of how we use execution
environment since the bundled approach doesn't work on Android.

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **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**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] 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.

---------

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
  • Loading branch information
Jonathansoufer and Mrtenz authored Sep 12, 2024
1 parent 17c288a commit f8d2df6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/lib/snaps/SnapsExecutionWebView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ 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.7.1/index.html';

const styles = createStyles();

Expand Down Expand Up @@ -89,11 +89,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 f8d2df6

Please sign in to comment.