aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/background.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r--app/scripts/background.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js
index 01bb39186..bc0fbdc37 100644
--- a/app/scripts/background.js
+++ b/app/scripts/background.js
@@ -11,6 +11,7 @@ const NotificationManager = require('./lib/notification-manager.js')
const MetamaskController = require('./metamask-controller')
const extension = require('extensionizer')
const firstTimeState = require('./first-time-state')
+const isPhish = require('./lib/is-phish')
const STORAGE_KEY = 'metamask-config'
const METAMASK_DEBUG = 'GULP_METAMASK_DEBUG'
@@ -153,9 +154,9 @@ function handleNewPageLoad (port, message) {
if (!pageLoaded || !global.metamaskController) return
const state = global.metamaskController.getState()
- const { blacklist } = state
+ const updatedBlacklist = state.blacklist
- if (blacklist && blacklist.includes(pageLoaded)) {
+ if (isPhish({ updatedBlacklist, hostname: pageLoaded })) {
port.postMessage({ 'blacklist': pageLoaded })
}
}