diff --git a/lib/plugins/ticker/bitpay/bitpay.js b/lib/plugins/ticker/bitpay/bitpay.js index c331d9961..80d2c67b8 100644 --- a/lib/plugins/ticker/bitpay/bitpay.js +++ b/lib/plugins/ticker/bitpay/bitpay.js @@ -5,7 +5,7 @@ function ticker (account, fiatCode, cryptoCode) { return axios.get('https://bitpay.com/api/rates/' + cryptoCode + '/' + fiatCode) .then(r => { const data = r.data - const price = BN(data.rate) + const price = BN(data.rate.toString()) return { rates: { ask: price, diff --git a/lib/plugins/ticker/bitstamp/bitstamp.js b/lib/plugins/ticker/bitstamp/bitstamp.js index aa35a7810..dbb81e5ef 100644 --- a/lib/plugins/ticker/bitstamp/bitstamp.js +++ b/lib/plugins/ticker/bitstamp/bitstamp.js @@ -10,7 +10,7 @@ exports.SUPPORTED_MODULES = ['ticker'] function findCurrency (fxRates, fiatCode) { const rates = _.find(_.matchesProperty('code', fiatCode), fxRates) if (!rates || !rates.rate) throw new Error(`Unsupported currency: ${fiatCode}`) - return BN(rates.rate) + return BN(rates.rate.toString()) } exports.ticker = function ticker (account, fiatCode, cryptoCode) { diff --git a/lib/plugins/ticker/itbit/itbit.js b/lib/plugins/ticker/itbit/itbit.js index 2b98e8a49..fcebbf59e 100644 --- a/lib/plugins/ticker/itbit/itbit.js +++ b/lib/plugins/ticker/itbit/itbit.js @@ -10,7 +10,7 @@ exports.SUPPORTED_MODULES = ['ticker'] function findCurrency (fxRates, fiatCode) { const rates = _.find(_.matchesProperty('code', fiatCode), fxRates) if (!rates || !rates.rate) throw new Error(`Unsupported currency: ${fiatCode}`) - return BN(rates.rate) + return BN(rates.rate.toString()) } exports.ticker = function ticker (account, fiatCode, cryptoCode) { diff --git a/lib/plugins/ticker/kraken/kraken.js b/lib/plugins/ticker/kraken/kraken.js index 626f461dd..bfa67886b 100644 --- a/lib/plugins/ticker/kraken/kraken.js +++ b/lib/plugins/ticker/kraken/kraken.js @@ -12,7 +12,7 @@ const PAIRS = common.PAIRS function findCurrency (fxRates, fiatCode) { const rates = _.find(_.matchesProperty('code', fiatCode), fxRates) if (!rates || !rates.rate) throw new Error(`Unsupported currency: ${fiatCode}`) - return BN(rates.rate) + return BN(rates.rate.toString()) } exports.ticker = function ticker (account, fiatCode, cryptoCode) { diff --git a/lib/plugins/ticker/quadrigacx/quadrigacx.js b/lib/plugins/ticker/quadrigacx/quadrigacx.js index d9acd2c5e..375e635e4 100644 --- a/lib/plugins/ticker/quadrigacx/quadrigacx.js +++ b/lib/plugins/ticker/quadrigacx/quadrigacx.js @@ -10,7 +10,7 @@ exports.SUPPORTED_MODULES = ['ticker'] function findCurrency (fxRates, fiatCode) { const rates = _.find(_.matchesProperty('code', fiatCode), fxRates) if (!rates || !rates.rate) throw new Error(`Unsupported currency: ${fiatCode}`) - return BN(rates.rate) + return BN(rates.rate.toString()) } exports.ticker = function ticker (account, fiatCode, cryptoCode) {