diff --git a/app/scripts/background.js b/app/scripts/background.js index e314086a6..bf1903a8c 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -319,7 +319,7 @@ function setupController (initState, initLangCode) { [ENVIRONMENT_TYPE_FULLSCREEN]: true, } - const metamaskBlacklistedPorts = [ + const metamaskBlocklistedPorts = [ 'trezor-connect', ] @@ -343,7 +343,7 @@ function setupController (initState, initLangCode) { const processName = remotePort.name const isMetaMaskInternalProcess = metamaskInternalProcessHash[processName] - if (metamaskBlacklistedPorts.includes(remotePort.name)) { + if (metamaskBlocklistedPorts.includes(remotePort.name)) { return false } diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index aeac6c5d3..e6f973e59 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -457,6 +457,9 @@ export default class MetamaskController extends EventEmitter { markPasswordForgotten: this.markPasswordForgotten.bind(this), unMarkPasswordForgotten: this.unMarkPasswordForgotten.bind(this), buyEth: this.buyEth.bind(this), + safelistPhishingDomain: this.safelistPhishingDomain.bind(this), + getRequestAccountTabIds: (cb) => cb(null, this.getRequestAccountTabIds()), + getOpenMetamaskTabsIds: (cb) => cb(null, this.getOpenMetamaskTabsIds()), // primary HD keyring management addNewAccount: nodeify(this.addNewAccount, this), @@ -494,9 +497,6 @@ export default class MetamaskController extends EventEmitter { completeOnboarding: nodeify(preferencesController.completeOnboarding, preferencesController), addKnownMethodData: nodeify(preferencesController.addKnownMethodData, preferencesController), - // BlacklistController - whitelistPhishingDomain: this.whitelistPhishingDomain.bind(this), - // AddressController setAddressBook: nodeify(this.addressBookController.set, this.addressBookController), removeFromAddressBook: this.addressBookController.delete.bind(this.addressBookController), @@ -572,9 +572,6 @@ export default class MetamaskController extends EventEmitter { addPermittedAccount: nodeify(permissionsController.addPermittedAccount, permissionsController), removePermittedAccount: nodeify(permissionsController.removePermittedAccount, permissionsController), requestAccountsPermission: nodeify(permissionsController.requestAccountsPermission, permissionsController), - - getRequestAccountTabIds: (cb) => cb(null, this.getRequestAccountTabIds()), - getOpenMetamaskTabsIds: (cb) => cb(null, this.getOpenMetamaskTabsIds()), } } @@ -2043,10 +2040,10 @@ export default class MetamaskController extends EventEmitter { */ /** - * Adds a domain to the PhishingController whitelist - * @param {string} hostname - the domain to whitelist + * Adds a domain to the PhishingController safelist + * @param {string} hostname - the domain to safelist */ - whitelistPhishingDomain (hostname) { + safelistPhishingDomain (hostname) { return this.phishingController.bypass(hostname) } diff --git a/app/scripts/phishing-detect.js b/app/scripts/phishing-detect.js index 8f5960ee0..f0ab55d00 100644 --- a/app/scripts/phishing-detect.js +++ b/app/scripts/phishing-detect.js @@ -27,7 +27,7 @@ function start () { const continueLink = document.getElementById('unsafe-continue') continueLink.addEventListener('click', () => { - metaMaskController.whitelistPhishingDomain(suspect.hostname) + metaMaskController.safelistPhishingDomain(suspect.hostname) window.location.href = suspect.href }) })