aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-01-11 04:04:26 +0800
committerkumavis <aaron@kumavis.me>2017-01-11 04:04:26 +0800
commitb301c0fb48f8a6ba464c7ed48d009166ea1fc230 (patch)
tree82fe879c186f3e2e4d3ef60a0e63e92e57f75f0d
parentaf312bdc90139f99a9a08f9d0f67d63e005e2a20 (diff)
downloadtangerine-wallet-browser-b301c0fb48f8a6ba464c7ed48d009166ea1fc230.tar
tangerine-wallet-browser-b301c0fb48f8a6ba464c7ed48d009166ea1fc230.tar.gz
tangerine-wallet-browser-b301c0fb48f8a6ba464c7ed48d009166ea1fc230.tar.bz2
tangerine-wallet-browser-b301c0fb48f8a6ba464c7ed48d009166ea1fc230.tar.lz
tangerine-wallet-browser-b301c0fb48f8a6ba464c7ed48d009166ea1fc230.tar.xz
tangerine-wallet-browser-b301c0fb48f8a6ba464c7ed48d009166ea1fc230.tar.zst
tangerine-wallet-browser-b301c0fb48f8a6ba464c7ed48d009166ea1fc230.zip
deps - replace promise-request with fetch
-rw-r--r--app/scripts/lib/config-manager.js7
-rw-r--r--package.json1
2 files changed, 3 insertions, 5 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) => {
diff --git a/package.json b/package.json
index 6f0fe00c7..23070cceb 100644
--- a/package.json
+++ b/package.json
@@ -85,7 +85,6 @@
"redux": "^3.0.5",
"redux-logger": "^2.3.1",
"redux-thunk": "^1.0.2",
- "request-promise": "^4.1.1",
"sandwich-expando": "^1.0.5",
"textarea-caret": "^3.0.1",
"three.js": "^0.73.2",