Merge pull request #1450 from siiky/fix/lam-609/make-notifs-actually-work
Make cash box notifications work
This commit is contained in:
commit
6a3e8cb969
2 changed files with 6 additions and 8 deletions
|
|
@ -92,7 +92,7 @@ const getNotifications = (cryptoCurrency, machine, config) => {
|
|||
const findByMachine = _.find(_.matches({ machine }))
|
||||
|
||||
const cryptoFields = ['cryptoHighBalance', 'cryptoLowBalance', 'highBalance', 'lowBalance']
|
||||
const fiatFields = ['fillingPercentageCassette1', 'fillingPercentageCassette2', 'fillingPercentageCassette3', 'fillingPercentageCassette4']
|
||||
const fiatFields = ['cashbox', 'fillingPercentageCassette1', 'fillingPercentageCassette2', 'fillingPercentageCassette3', 'fillingPercentageCassette4']
|
||||
|
||||
const getCryptoSettings = _.compose(_.pick(cryptoFields), _.defaultTo(notifications), findByCryptoCurrency)
|
||||
const cryptoSettings = getCryptoSettings(notifications.cryptoBalanceOverrides)
|
||||
|
|
|
|||
|
|
@ -758,13 +758,11 @@ function plugins (settings, deviceId) {
|
|||
const fiatCode = localeConfig.fiatCurrency
|
||||
|
||||
return machineLoader.getMachines()
|
||||
.then(devices => {
|
||||
return Promise.all([
|
||||
checkCryptoBalances(fiatCode, devices),
|
||||
checkDevicesCashBalances(fiatCode, devices)
|
||||
])
|
||||
.then(_.flow(_.flattenDeep, _.compact))
|
||||
})
|
||||
.then(devices => Promise.all([
|
||||
checkCryptoBalances(fiatCode, devices),
|
||||
checkDevicesCashBalances(fiatCode, devices)
|
||||
]))
|
||||
.then(_.flow(_.flattenDeep, _.compact))
|
||||
}
|
||||
|
||||
function randomCode () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue