feature/default_network_editable
parent
aea5735b29
commit
ecaa235b5e
@ -1,14 +0,0 @@ |
||||
const extension = require('extensionizer') |
||||
|
||||
var port = extension.runtime.connect({name: 'blacklister'}) |
||||
port.postMessage({ 'pageLoaded': window.location.hostname }) |
||||
port.onMessage.addListener(redirectIfBlacklisted) |
||||
|
||||
function redirectIfBlacklisted (response) { |
||||
const { blacklist } = response |
||||
const host = window.location.hostname |
||||
if (blacklist && blacklist === host) { |
||||
window.location.href = 'https://metamask.io/phishing.html' |
||||
} |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
const assert = require('assert') |
||||
const isPhish = require('../../app/scripts/lib/is-phish') |
||||
|
||||
describe('blacklister', function () { |
||||
describe('phishing detection test', function () { |
||||
describe('#isPhish', function () { |
||||
it('should not flag whitelisted values', function () { |
||||
var result = isPhish({ hostname: 'www.metamask.io' }) |
Loading…
Reference in new issue