check for null rates
This commit is contained in:
parent
c790456a87
commit
26cbefdf7c
1 changed files with 3 additions and 1 deletions
|
|
@ -33,7 +33,9 @@ function buildRates () {
|
||||||
|
|
||||||
var rates = {}
|
var rates = {}
|
||||||
cryptoCodes.forEach(function (cryptoCode) {
|
cryptoCodes.forEach(function (cryptoCode) {
|
||||||
var rate = plugins.getDeviceRate(cryptoCode).rates
|
var _rate = plugins.getDeviceRate(cryptoCode)
|
||||||
|
if (!_rate) return
|
||||||
|
var rate = _rate.rates
|
||||||
rates[cryptoCode] = {
|
rates[cryptoCode] = {
|
||||||
cashIn: rate.ask.times(cashInCommission),
|
cashIn: rate.ask.times(cashInCommission),
|
||||||
cashOut: rate.bid.div(cashOutCommission)
|
cashOut: rate.bid.div(cashOutCommission)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue