deps - replace promise-request with fetch

feature/default_network_editable
kumavis 8 years ago
parent af312bdc90
commit b301c0fb48
  1. 7
      app/scripts/lib/config-manager.js
  2. 1
      package.json

@ -1,7 +1,6 @@
const Migrator = require('pojo-migrator') const Migrator = require('pojo-migrator')
const MetamaskConfig = require('../config.js') const MetamaskConfig = require('../config.js')
const migrations = require('./migrations') const migrations = require('./migrations')
const rp = require('request-promise')
const ethUtil = require('ethereumjs-util') const ethUtil = require('ethereumjs-util')
const normalize = require('./sig-util').normalize const normalize = require('./sig-util').normalize
@ -301,9 +300,9 @@ ConfigManager.prototype.getCurrentFiat = function () {
ConfigManager.prototype.updateConversionRate = function () { ConfigManager.prototype.updateConversionRate = function () {
var data = this.getData() var data = this.getData()
return rp(`https://www.cryptonator.com/api/ticker/eth-${data.fiatCurrency}`) return fetch(`https://www.cryptonator.com/api/ticker/eth-${data.fiatCurrency}`)
.then((response) => { .then(response => response.json())
const parsedResponse = JSON.parse(response) .then((parsedResponse) => {
this.setConversionPrice(parsedResponse.ticker.price) this.setConversionPrice(parsedResponse.ticker.price)
this.setConversionDate(parsedResponse.timestamp) this.setConversionDate(parsedResponse.timestamp)
}).catch((err) => { }).catch((err) => {

@ -85,7 +85,6 @@
"redux": "^3.0.5", "redux": "^3.0.5",
"redux-logger": "^2.3.1", "redux-logger": "^2.3.1",
"redux-thunk": "^1.0.2", "redux-thunk": "^1.0.2",
"request-promise": "^4.1.1",
"sandwich-expando": "^1.0.5", "sandwich-expando": "^1.0.5",
"textarea-caret": "^3.0.1", "textarea-caret": "^3.0.1",
"three.js": "^0.73.2", "three.js": "^0.73.2",

Loading…
Cancel
Save