mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Add domain whitelist method to MetaMaskController
This commit is contained in:
parent
4dd6c8168f
commit
58d856bd84
@ -387,6 +387,9 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||||||
setAccountLabel: nodeify(preferencesController.setAccountLabel, preferencesController),
|
setAccountLabel: nodeify(preferencesController.setAccountLabel, preferencesController),
|
||||||
setFeatureFlag: nodeify(preferencesController.setFeatureFlag, preferencesController),
|
setFeatureFlag: nodeify(preferencesController.setFeatureFlag, preferencesController),
|
||||||
|
|
||||||
|
// BlacklistController
|
||||||
|
whitelistPhishingDomain: this.whitelistPhishingDomain.bind(this),
|
||||||
|
|
||||||
// AddressController
|
// AddressController
|
||||||
setAddressBook: nodeify(addressBookController.setAddressBook, addressBookController),
|
setAddressBook: nodeify(addressBookController.setAddressBook, addressBookController),
|
||||||
|
|
||||||
@ -1541,4 +1544,12 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a domain to the {@link BlacklistController} whitelist
|
||||||
|
* @param {string} hostname the domain to whitelist
|
||||||
|
*/
|
||||||
|
whitelistPhishingDomain (hostname) {
|
||||||
|
return this.blacklistController.whitelistDomain(hostname)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user