From b1574c277a08e98c6581e0b0a79b6f95587eaf0c Mon Sep 17 00:00:00 2001 From: Liordino Neto Date: Sun, 1 Nov 2020 13:06:52 -0300 Subject: [PATCH] fix: removed the attempts to use the bignumber.js lib with null values --- lib/plugins.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins.js b/lib/plugins.js index c71de457..42592163 100644 --- a/lib/plugins.js +++ b/lib/plugins.js @@ -706,10 +706,10 @@ function plugins (settings, deviceId) { fiatCode, } - if (BN(fiatBalance.balance).lt(lowAlertThreshold)) + if (lowAlertThreshold && BN(fiatBalance.balance).lt(lowAlertThreshold)) 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 null