diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-03-30 06:19:46 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-03-30 06:19:46 +0800 |
commit | 4cf3beda25e7883aac37ee188d3bb102dea4afa3 (patch) | |
tree | 837961d02cc359e446342094bf8841b615029cc3 /library/sw-core.js | |
parent | 2b1a9c5ae880afe1a5bf2d11eefbbdf26dc6e27c (diff) | |
download | tangerine-wallet-browser-4cf3beda25e7883aac37ee188d3bb102dea4afa3.tar tangerine-wallet-browser-4cf3beda25e7883aac37ee188d3bb102dea4afa3.tar.gz tangerine-wallet-browser-4cf3beda25e7883aac37ee188d3bb102dea4afa3.tar.bz2 tangerine-wallet-browser-4cf3beda25e7883aac37ee188d3bb102dea4afa3.tar.lz tangerine-wallet-browser-4cf3beda25e7883aac37ee188d3bb102dea4afa3.tar.xz tangerine-wallet-browser-4cf3beda25e7883aac37ee188d3bb102dea4afa3.tar.zst tangerine-wallet-browser-4cf3beda25e7883aac37ee188d3bb102dea4afa3.zip |
Bump sw-stream and setup "untrusted and trusted comunication"
Diffstat (limited to 'library/sw-core.js')
-rw-r--r-- | library/sw-core.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/sw-core.js b/library/sw-core.js index 4d95898d9..9f399cccf 100644 --- a/library/sw-core.js +++ b/library/sw-core.js @@ -117,11 +117,11 @@ function setupController (initState, client) { */ connectionListener.on('remote', (portStream, messageEvent) => { console.log('REMOTE CONECTION FOUND***********') - connectRemote(portStream, messageEvent.origin) + connectRemote(portStream, messageEvent.data.context) }) - function connectRemote (connectionStream, originDomain) { - var isMetaMaskInternalProcess = (originDomain === 'http://localhost:9001') + function connectRemote (connectionStream, context) { + var isMetaMaskInternalProcess = (context !== 'dapp') if (isMetaMaskInternalProcess) { // communication with popup controller.setupTrustedCommunication(connectionStream, 'MetaMask') |