1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Merge pull request #1865 from MetaMask/blacklist-moar

blacklist - update phishing on boot and speed up polling to 4 min
This commit is contained in:
Frankie 2017-08-04 17:04:57 -04:00 committed by GitHub
commit befb5de325
2 changed files with 4 additions and 3 deletions

View File

@ -4,8 +4,8 @@ const PhishingDetector = require('eth-phishing-detect/src/detector')
// compute phishing lists // compute phishing lists
const PHISHING_DETECTION_CONFIG = require('eth-phishing-detect/src/config.json') const PHISHING_DETECTION_CONFIG = require('eth-phishing-detect/src/config.json')
// every ten minutes // every four minutes
const POLLING_INTERVAL = 10 * 60 * 1000 const POLLING_INTERVAL = 4 * 60 * 1000
class BlacklistController { class BlacklistController {
@ -41,6 +41,7 @@ class BlacklistController {
scheduleUpdates () { scheduleUpdates () {
if (this._phishingUpdateIntervalRef) return if (this._phishingUpdateIntervalRef) return
this.updatePhishingList()
this._phishingUpdateIntervalRef = setInterval(() => { this._phishingUpdateIntervalRef = setInterval(() => {
this.updatePhishingList() this.updatePhishingList()
}, POLLING_INTERVAL) }, POLLING_INTERVAL)

View File

@ -68,7 +68,7 @@
"eth-bin-to-ops": "^1.0.1", "eth-bin-to-ops": "^1.0.1",
"eth-contract-metadata": "^1.1.4", "eth-contract-metadata": "^1.1.4",
"eth-hd-keyring": "^1.1.1", "eth-hd-keyring": "^1.1.1",
"eth-phishing-detect": "^1.1.0", "eth-phishing-detect": "^1.1.3",
"eth-query": "^2.1.2", "eth-query": "^2.1.2",
"eth-sig-util": "^1.2.2", "eth-sig-util": "^1.2.2",
"eth-simple-keyring": "^1.1.1", "eth-simple-keyring": "^1.1.1",