Update to new bitpay api version

This commit is contained in:
Taranto 2019-09-04 16:49:59 +01:00 committed by Josh Harvey
parent 96e0c0198d
commit 8a43d4ee7c

View file

@ -2,9 +2,9 @@ const axios = require('axios')
const BN = require('../../../bn')
function ticker (account, fiatCode, cryptoCode) {
return axios.get('https://bitpay.com/api/rates/' + cryptoCode + '/' + fiatCode)
return axios.get('https://bitpay.com/rates/' + cryptoCode + '/' + fiatCode)
.then(r => {
const data = r.data
const data = r.data.data
const price = BN(data.rate.toString())
return {
rates: {