diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-08-23 02:04:26 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-08-23 02:04:26 +0800 |
commit | b208ce723459a13f9b1fd6837af9d2858ba4cc17 (patch) | |
tree | ad33e24cb6c9793cfa3a495bd215d2b469a68888 /app/scripts | |
parent | fdff7685492bb40c8b6721b2290d9d5a8cc7ceb2 (diff) | |
download | tangerine-wallet-browser-b208ce723459a13f9b1fd6837af9d2858ba4cc17.tar tangerine-wallet-browser-b208ce723459a13f9b1fd6837af9d2858ba4cc17.tar.gz tangerine-wallet-browser-b208ce723459a13f9b1fd6837af9d2858ba4cc17.tar.bz2 tangerine-wallet-browser-b208ce723459a13f9b1fd6837af9d2858ba4cc17.tar.lz tangerine-wallet-browser-b208ce723459a13f9b1fd6837af9d2858ba4cc17.tar.xz tangerine-wallet-browser-b208ce723459a13f9b1fd6837af9d2858ba4cc17.tar.zst tangerine-wallet-browser-b208ce723459a13f9b1fd6837af9d2858ba4cc17.zip |
add port names blacklist
Diffstat (limited to 'app/scripts')
-rw-r--r-- | app/scripts/background.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index d4d87e0d5..1599b8f99 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -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 |