mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
deps - replace promise-request with fetch
This commit is contained in:
parent
af312bdc90
commit
b301c0fb48
@ -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) => {
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user