chore: server code formatting
This commit is contained in:
parent
aedabcbdee
commit
68517170e2
234 changed files with 9824 additions and 6195 deletions
|
|
@ -7,16 +7,17 @@ const { BTC, BCH, LN } = COINS
|
|||
const CRYPTO = [BTC, BCH, LN]
|
||||
const FIAT = 'ALL_CURRENCIES'
|
||||
|
||||
function ticker (fiatCode, cryptoCode) {
|
||||
return axios.get('https://bitpay.com/rates/' + cryptoCode + '/' + fiatCode)
|
||||
function ticker(fiatCode, cryptoCode) {
|
||||
return axios
|
||||
.get('https://bitpay.com/rates/' + cryptoCode + '/' + fiatCode)
|
||||
.then(r => {
|
||||
const data = r.data.data
|
||||
const price = new BN(data.rate.toString())
|
||||
return {
|
||||
rates: {
|
||||
ask: price,
|
||||
bid: price
|
||||
}
|
||||
bid: price,
|
||||
},
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -25,5 +26,5 @@ module.exports = {
|
|||
ticker,
|
||||
name: 'BitPay',
|
||||
CRYPTO,
|
||||
FIAT
|
||||
FIAT,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue