1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

blacklist -> blocklist; whitelist -> safelist

This commit is contained in:
Erik Marks 2020-06-08 11:06:37 -07:00
parent 7a4bb7f73a
commit 8f086087d8
3 changed files with 9 additions and 12 deletions

View File

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

View File

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

View File

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