diff options
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') |