fix: remove duplicated createBatch() calls

fix: rename cassetteMaxCapacity to snake uppercase
fix: notification module retrieving the wrong override fields
This commit is contained in:
Sérgio Salgado 2021-11-29 19:57:28 +00:00
parent 31dcf890de
commit 15e0182ba1
7 changed files with 19 additions and 39 deletions

View file

@ -82,7 +82,7 @@ const getNotifications = (cryptoCurrency, machine, config) => {
const findByMachine = _.find(_.matches({ machine }))
const cryptoFields = ['cryptoHighBalance', 'cryptoLowBalance', 'highBalance', 'lowBalance']
const fiatFields = ['fiatBalanceCassette1', 'fiatBalanceCassette2', 'fiatBalanceCassette3', 'fiatBalanceCassette4']
const fiatFields = ['fillingPercentageCassette1', 'fillingPercentageCassette2', 'fillingPercentageCassette3', 'fillingPercentageCassette4']
const getCryptoSettings = _.compose(_.pick(cryptoFields), _.defaultTo(notifications), findByCryptoCurrency)
const cryptoSettings = getCryptoSettings(notifications.cryptoBalanceOverrides)