diff options
author | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-07 10:55:34 +0800 |
---|---|---|
committer | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-07 10:55:34 +0800 |
commit | 02c2106c3bb6900801cf5ffe4a1d9bd46183b089 (patch) | |
tree | 23f6d76a57c7b58a385ee49e8a24e402ed474775 /app/scripts/controllers/infura.js | |
parent | fd36d95c506db55afa33a251c6c187c194a55854 (diff) | |
parent | 2ba5737728d2539fc3bc9015e440f37341219cdc (diff) | |
download | tangerine-wallet-browser-02c2106c3bb6900801cf5ffe4a1d9bd46183b089.tar tangerine-wallet-browser-02c2106c3bb6900801cf5ffe4a1d9bd46183b089.tar.gz tangerine-wallet-browser-02c2106c3bb6900801cf5ffe4a1d9bd46183b089.tar.bz2 tangerine-wallet-browser-02c2106c3bb6900801cf5ffe4a1d9bd46183b089.tar.lz tangerine-wallet-browser-02c2106c3bb6900801cf5ffe4a1d9bd46183b089.tar.xz tangerine-wallet-browser-02c2106c3bb6900801cf5ffe4a1d9bd46183b089.tar.zst tangerine-wallet-browser-02c2106c3bb6900801cf5ffe4a1d9bd46183b089.zip |
Merge branch 'master' into feat/mm-ui-5
Diffstat (limited to 'app/scripts/controllers/infura.js')
-rw-r--r-- | app/scripts/controllers/infura.js | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/app/scripts/controllers/infura.js b/app/scripts/controllers/infura.js index 97b2ab7e3..10adb1004 100644 --- a/app/scripts/controllers/infura.js +++ b/app/scripts/controllers/infura.js @@ -1,16 +1,14 @@ const ObservableStore = require('obs-store') const extend = require('xtend') -const recentBlacklist = require('etheraddresslookup/blacklists/domains.json') // every ten minutes -const POLLING_INTERVAL = 300000 +const POLLING_INTERVAL = 10 * 60 * 1000 class InfuraController { constructor (opts = {}) { const initState = extend({ infuraNetworkStatus: {}, - blacklist: recentBlacklist, }, opts.initState) this.store = new ObservableStore(initState) } @@ -32,24 +30,12 @@ class InfuraController { }) } - updateLocalBlacklist () { - return fetch('https://api.infura.io/v1/blacklist') - .then(response => response.json()) - .then((parsedResponse) => { - this.store.updateState({ - blacklist: parsedResponse, - }) - return parsedResponse - }) - } - scheduleInfuraNetworkCheck () { if (this.conversionInterval) { clearInterval(this.conversionInterval) } this.conversionInterval = setInterval(() => { this.checkInfuraNetworkStatus() - this.updateLocalBlacklist() }, POLLING_INTERVAL) } } |