fix balance error bug

This commit is contained in:
Josh Harvey 2017-07-13 01:13:38 +03:00
parent 8b829f152d
commit f454e3266a
2 changed files with 6 additions and 1 deletions

View file

@ -275,6 +275,8 @@ function plugins (settings, deviceId) {
wallet.balance(settings, cryptoCode)
])
.then(([rates, balanceRec]) => {
if (!rates || !balanceRec) return null
const rawRate = rates.rates.ask
const cashInCommission = BN(1).minus(BN(config.cashInCommission).div(100))
const balance = balanceRec.balance
@ -538,6 +540,9 @@ function plugins (settings, deviceId) {
function checkCryptoBalance (fiatCode, rec) {
const [cryptoCode, fiatBalance] = rec
if (!fiatBalance) return null
const config = configManager.cryptoScoped(cryptoCode, settings.config)
const cryptoAlertThreshold = config.cryptoAlertThreshold

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "lamassu-server",
"version": "5.5.10",
"version": "5.5.11",
"lockfileVersion": 1,
"dependencies": {
"@ava/babel-plugin-throws-helper": {