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:
parent
7a4bb7f73a
commit
8f086087d8
@ -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…
Reference in New Issue
Block a user