Feat: crypto balance notifications saving in DB
Chore: add new column "detail" to transactions table migration Feat: check if older notification is valid before sending new one Feat: error saving to database Fix: fix error when invalidating notification on clearCryptoBalanceNotifications Chre: code refactor in new-settings-loader for simplicity Chore: refactor code on notifier and merge similar functions
This commit is contained in:
parent
196a05549f
commit
3b3bdf839b
9 changed files with 224 additions and 34 deletions
|
|
@ -101,7 +101,7 @@ function renameMachine (rec) {
|
|||
function resetCashOutBills (rec) {
|
||||
const sql = `
|
||||
update devices set cassette1=$1, cassette2=$2 where device_id=$3;
|
||||
update notifications set read = 't' where device_id = $3 AND type = 'fiatBalance' AND read = 'f';
|
||||
update notifications set read = 't', valid = 'f' where read = 'f' AND device_id = $3 AND type = 'fiatBalance';
|
||||
`
|
||||
return db.none(sql, [rec.cassettes[0], rec.cassettes[1], rec.deviceId])
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue