Fix coinATMRadar behaviour when null cash out value is received (#187)

* Fix behaviour when null cash out value is received

* refactor: use loadash invoke method
This commit is contained in:
pedromiguelmiranda 2018-10-15 20:51:54 +01:00 committed by Josh Harvey
parent 2e6157e97b
commit 4e3ed57cf8

View file

@ -27,8 +27,10 @@ function mapCoin (info, deviceId, cryptoCode) {
const cashInFee = showRates ? cryptoConfig.cashInCommission / 100 : null
const cashOutFee = showRates ? cryptoConfig.cashOutCommission / 100 : null
const cashInRate = showRates ? rates.cashIn.toNumber() : null
const cashOutRate = showRates ? rates.cashOut.toNumber() : null
const cashInRate = showRates ? _.invoke('cashIn.toNumber', rates) : null
const cashOutRate = showRates ? _.invoke('cashOut.toNumber', rates) : null
return {
cryptoCode,