fixed cashOut rates bug
This commit is contained in:
parent
93983c9645
commit
87fdb355b2
6 changed files with 733 additions and 5090 deletions
|
|
@ -45,7 +45,7 @@ function plugins (settings, deviceId) {
|
|||
const cashInCommission = BN(1).add(BN(cryptoConfig.cashInCommission).div(100))
|
||||
|
||||
const cashOutCommission = _.isNil(cryptoConfig.cashOutCommission)
|
||||
? null
|
||||
? undefined
|
||||
: BN(1).add(BN(cryptoConfig.cashOutCommission).div(100))
|
||||
|
||||
if (Date.now() - rateRec.timestamp > STALE_TICKER) return logger.warn('Stale rate for ' + cryptoCode)
|
||||
|
|
@ -56,9 +56,16 @@ function plugins (settings, deviceId) {
|
|||
}
|
||||
})
|
||||
|
||||
console.log('DEBUG100: %j', rates)
|
||||
|
||||
return rates
|
||||
}
|
||||
|
||||
function notificationsEnabled () {
|
||||
const config = configManager.unscoped(settings.config)
|
||||
return config.notificationsEnabled
|
||||
}
|
||||
|
||||
function buildBalances (balanceRecs) {
|
||||
const config = configManager.machineScoped(deviceId, settings.config)
|
||||
const cryptoCodes = config.cryptoCurrencies
|
||||
|
|
@ -606,7 +613,8 @@ function plugins (settings, deviceId) {
|
|||
getMachineNames,
|
||||
buildAvailableCassettes,
|
||||
buy,
|
||||
sell
|
||||
sell,
|
||||
notificationsEnabled
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue