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:
parent
fdff768549
commit
b208ce7234
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user