Merge pull request #960 from chaotixkilla/fix-notification-override-alerts

Fix notification overrides ignoring cassettes 3 and 4
This commit is contained in:
Rafael Taranto 2021-12-01 10:35:19 +00:00 committed by GitHub
commit e8edd05a64

View file

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