1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 17:33:23 +01:00

Fix popup flag assignment

This commit is contained in:
Dan Finlay 2016-09-14 11:57:41 -07:00
parent cf26523852
commit b7e6ec5cea

View File

@ -44,7 +44,7 @@ function connectRemote (remotePort) {
var portStream = new PortStream(remotePort) var portStream = new PortStream(remotePort)
if (isMetaMaskInternalProcess) { if (isMetaMaskInternalProcess) {
// communication with popup // communication with popup
remotePort.name === 'popup' ? popupIsOpen = true : popupIsOpen = false popupIsOpen = remotePort.name === 'popup'
setupTrustedCommunication(portStream, 'MetaMask', remotePort.name) setupTrustedCommunication(portStream, 'MetaMask', remotePort.name)
} else { } else {
// communication with page // communication with page
@ -67,7 +67,6 @@ function setupTrustedCommunication (connectionStream, originDomain, metamaskCont
// connect features // connect features
setupControllerConnection(mx.createStream('controller')) setupControllerConnection(mx.createStream('controller'))
controller.setupProviderConnection(mx.createStream('provider'), originDomain) controller.setupProviderConnection(mx.createStream('provider'), originDomain)
if (metamaskContext === 'popup') popupIsOpen = true
} }
// //