mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +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,
|
[ENVIRONMENT_TYPE_FULLSCREEN]: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const metamaskBlacklistedPorts = [
|
||||||
|
'trezor-connect',
|
||||||
|
]
|
||||||
|
|
||||||
const isClientOpenStatus = () => {
|
const isClientOpenStatus = () => {
|
||||||
return popupIsOpen || Boolean(Object.keys(openMetamaskTabsIDs).length) || notificationIsOpen
|
return popupIsOpen || Boolean(Object.keys(openMetamaskTabsIDs).length) || notificationIsOpen
|
||||||
}
|
}
|
||||||
@ -352,6 +356,10 @@ function setupController (initState, initLangCode) {
|
|||||||
const processName = remotePort.name
|
const processName = remotePort.name
|
||||||
const isMetaMaskInternalProcess = metamaskInternalProcessHash[processName]
|
const isMetaMaskInternalProcess = metamaskInternalProcessHash[processName]
|
||||||
|
|
||||||
|
if (metamaskBlacklistedPorts.includes(remotePort.name)) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
if (isMetaMaskInternalProcess) {
|
if (isMetaMaskInternalProcess) {
|
||||||
const portStream = new PortStream(remotePort)
|
const portStream = new PortStream(remotePort)
|
||||||
// communication with popup
|
// communication with popup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user