Skip to content

Commit

Permalink
Add start snap command
Browse files Browse the repository at this point in the history
  • Loading branch information
gantunesr committed Nov 17, 2022
1 parent 0efa08d commit 7905892
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/components/Views/Snaps/SnapsPOC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ const SnapsPOC: React.FC = () => {
args: { origin: 'origin', request: { method: 'hello' } },
}),
);
// webviewRef.current.postMessage(
// JSON.stringify({
// method: 'start_snap',
// snapId: 'snap-3',
// sourceCode:
// 'https://raw.githubusercontent.com/MetaMask/metamask-mobile/snaps/exec-env/snap_bundles/helloWorld_snap.js',
// }),
// );
};

// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
Expand All @@ -151,6 +159,9 @@ const SnapsPOC: React.FC = () => {
injectedJavaScript={runFirst}
mixedContentMode="compatibility"
onMessage={onMessage}
applicationNameForUserAgent={
'WebView Snap Execution Environment MetaMask Mobile'
}
/>
</View>
</View>
Expand Down

0 comments on commit 7905892

Please sign in to comment.