fix: removed the attempts to use the bignumber.js lib with null values

This commit is contained in:
Liordino Neto 2020-11-01 13:06:52 -03:00 committed by Josh Harvey
parent 5b502c1395
commit b1574c277a

View file

@ -706,10 +706,10 @@ function plugins (settings, deviceId) {
fiatCode, fiatCode,
} }
if (BN(fiatBalance.balance).lt(lowAlertThreshold)) if (lowAlertThreshold && BN(fiatBalance.balance).lt(lowAlertThreshold))
return _.set('code')('LOW_CRYPTO_BALANCE')(req) return _.set('code')('LOW_CRYPTO_BALANCE')(req)
if (BN(fiatBalance.balance).gt(highAlertThreshold)) if (highAlertThreshold && BN(fiatBalance.balance).gt(highAlertThreshold))
return _.set('code')('HIGH_CRYPTO_BALANCE')(req) return _.set('code')('HIGH_CRYPTO_BALANCE')(req)
return null return null