aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-10-02 07:35:57 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-10-02 21:13:46 +0800
commit58d856bd84a06228706fce3d2a13348e25f1a4ae (patch)
treefa0faa1c2bd9f5ab3dbaf6f2132d9ab5d6bb1352 /app
parent4dd6c8168f3dbec5a0e910069a4a29a640e39942 (diff)
downloadtangerine-wallet-browser-58d856bd84a06228706fce3d2a13348e25f1a4ae.tar
tangerine-wallet-browser-58d856bd84a06228706fce3d2a13348e25f1a4ae.tar.gz
tangerine-wallet-browser-58d856bd84a06228706fce3d2a13348e25f1a4ae.tar.bz2
tangerine-wallet-browser-58d856bd84a06228706fce3d2a13348e25f1a4ae.tar.lz
tangerine-wallet-browser-58d856bd84a06228706fce3d2a13348e25f1a4ae.tar.xz
tangerine-wallet-browser-58d856bd84a06228706fce3d2a13348e25f1a4ae.tar.zst
tangerine-wallet-browser-58d856bd84a06228706fce3d2a13348e25f1a4ae.zip
Add domain whitelist method to MetaMaskController
Diffstat (limited to 'app')
-rw-r--r--app/scripts/metamask-controller.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 1f0527c7e..34ca80dd7 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -387,6 +387,9 @@ module.exports = class MetamaskController extends EventEmitter {
setAccountLabel: nodeify(preferencesController.setAccountLabel, preferencesController),
setFeatureFlag: nodeify(preferencesController.setFeatureFlag, preferencesController),
+ // BlacklistController
+ whitelistPhishingDomain: this.whitelistPhishingDomain.bind(this),
+
// AddressController
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)
+ }
}