1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

add port names blacklist

This commit is contained in:
brunobar79 2018-08-22 14:04:26 -04:00
parent fdff768549
commit b208ce7234

View File

@ -332,6 +332,10 @@ function setupController (initState, initLangCode) {
[ENVIRONMENT_TYPE_FULLSCREEN]: true,
}
const metamaskBlacklistedPorts = [
'trezor-connect',
]
const isClientOpenStatus = () => {
return popupIsOpen || Boolean(Object.keys(openMetamaskTabsIDs).length) || notificationIsOpen
}
@ -352,6 +356,10 @@ function setupController (initState, initLangCode) {
const processName = remotePort.name
const isMetaMaskInternalProcess = metamaskInternalProcessHash[processName]
if (metamaskBlacklistedPorts.includes(remotePort.name)) {
return false
}
if (isMetaMaskInternalProcess) {
const portStream = new PortStream(remotePort)
// communication with popup