Code readability and added the forgotten mocks
This commit is contained in:
parent
134eaaa518
commit
7accdaa84f
12 changed files with 126 additions and 96 deletions
|
|
@ -1,21 +0,0 @@
|
|||
const axios = require('axios')
|
||||
const BN = require('../../../bn')
|
||||
|
||||
function ticker (account, fiatCode, cryptoCode) {
|
||||
return axios.get('https://bitpay.com/rates/' + cryptoCode + '/' + fiatCode)
|
||||
.then(r => {
|
||||
const data = r.data.data
|
||||
const price = BN(data.rate.toString())
|
||||
return {
|
||||
rates: {
|
||||
ask: price,
|
||||
bid: price
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
ticker,
|
||||
name: 'BitPay'
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue