diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-01-11 04:46:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-11 04:46:06 +0800 |
commit | 2dc87b4bd4fa7d068def5d1fb9c72bd233d6ef47 (patch) | |
tree | efd2a3f62355afbbd93ce07944b8289b05d43943 /app | |
parent | af312bdc90139f99a9a08f9d0f67d63e005e2a20 (diff) | |
parent | bd382f4705ffdc10d193d02dfaa9d1b5ff2f1488 (diff) | |
download | tangerine-wallet-browser-2dc87b4bd4fa7d068def5d1fb9c72bd233d6ef47.tar tangerine-wallet-browser-2dc87b4bd4fa7d068def5d1fb9c72bd233d6ef47.tar.gz tangerine-wallet-browser-2dc87b4bd4fa7d068def5d1fb9c72bd233d6ef47.tar.bz2 tangerine-wallet-browser-2dc87b4bd4fa7d068def5d1fb9c72bd233d6ef47.tar.lz tangerine-wallet-browser-2dc87b4bd4fa7d068def5d1fb9c72bd233d6ef47.tar.xz tangerine-wallet-browser-2dc87b4bd4fa7d068def5d1fb9c72bd233d6ef47.tar.zst tangerine-wallet-browser-2dc87b4bd4fa7d068def5d1fb9c72bd233d6ef47.zip |
Merge pull request #983 from MetaMask/slim1
deps - replace promise-request with fetch
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/lib/config-manager.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js index 93501c859..3a1f12ac0 100644 --- a/app/scripts/lib/config-manager.js +++ b/app/scripts/lib/config-manager.js @@ -1,7 +1,6 @@ const Migrator = require('pojo-migrator') const MetamaskConfig = require('../config.js') const migrations = require('./migrations') -const rp = require('request-promise') const ethUtil = require('ethereumjs-util') const normalize = require('./sig-util').normalize @@ -301,9 +300,9 @@ ConfigManager.prototype.getCurrentFiat = function () { ConfigManager.prototype.updateConversionRate = function () { var data = this.getData() - return rp(`https://www.cryptonator.com/api/ticker/eth-${data.fiatCurrency}`) - .then((response) => { - const parsedResponse = JSON.parse(response) + return fetch(`https://www.cryptonator.com/api/ticker/eth-${data.fiatCurrency}`) + .then(response => response.json()) + .then((parsedResponse) => { this.setConversionPrice(parsedResponse.ticker.price) this.setConversionDate(parsedResponse.timestamp) }).catch((err) => { |