blacklist -> blocklist; whitelist -> safelist

feature/default_network_editable
Erik Marks 5 years ago
parent 7a4bb7f73a
commit 8f086087d8
  1. 4
      app/scripts/background.js
  2. 15
      app/scripts/metamask-controller.js
  3. 2
      app/scripts/phishing-detect.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
}

@ -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)
}

@ -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
})
})

Loading…
Cancel
Save