Chore: move catch into queries file
This commit is contained in:
parent
05373e83db
commit
82912b728a
7 changed files with 26 additions and 28 deletions
|
|
@ -47,7 +47,6 @@ const customerComplianceNotify = (customer, deviceId, code, days = null) => {
|
|||
if (res.length > 0) return Promise.resolve()
|
||||
return queries.addNotification(COMPLIANCE, message, detailB)
|
||||
})
|
||||
.catch(console.error)
|
||||
}
|
||||
|
||||
const clearOldFiatNotifications = (balances) => {
|
||||
|
|
@ -115,7 +114,7 @@ const balancesNotify = (balances) => {
|
|||
const fiatFilter = o => o.code === 'LOW_CASH_OUT'
|
||||
const cryptoWarnings = _.filter(cryptoFilter, balances)
|
||||
const fiatWarnings = _.filter(fiatFilter, balances)
|
||||
return Promise.all([cryptoBalancesNotify(cryptoWarnings), fiatBalancesNotify(fiatWarnings)]).catch(console.error)
|
||||
return Promise.all([cryptoBalancesNotify(cryptoWarnings), fiatBalancesNotify(fiatWarnings)])
|
||||
}
|
||||
|
||||
const clearOldErrorNotifications = alerts => {
|
||||
|
|
@ -131,7 +130,6 @@ const clearOldErrorNotifications = alerts => {
|
|||
if (!indexesToInvalidate.length) return Promise.resolve()
|
||||
return queries.batchInvalidate(indexesToInvalidate)
|
||||
})
|
||||
.catch(console.error)
|
||||
}
|
||||
|
||||
const errorAlertsNotify = (alertRec) => {
|
||||
|
|
@ -160,7 +158,7 @@ const errorAlertsNotify = (alertRec) => {
|
|||
}
|
||||
}
|
||||
}, alerts)
|
||||
}).catch(console.error)
|
||||
})
|
||||
}
|
||||
|
||||
function notifCenterTransactionNotify (isHighValue, direction, fiat, fiatCode, deviceId, cryptoAddress) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue