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:
Cesar 2020-12-10 18:26:13 +00:00 committed by Josh Harvey
parent 196a05549f
commit 3b3bdf839b
9 changed files with 224 additions and 34 deletions

View file

@ -22,10 +22,11 @@ exports.up = function (next) {
"id" uuid NOT NULL PRIMARY KEY,
"type" notification_type NOT NULL,
"detail" TEXT,
"device_id" TEXT NOT NULL,
"device_id" TEXT,
"message" TEXT NOT NULL,
"created" time with time zone NOT NULL,
"created" TIMESTAMP WITH TIME ZONE NOT NULL,
"read" BOOLEAN NOT NULL DEFAULT 'false',
"valid" BOOLEAN NOT NULL DEFAULT 'true',
CONSTRAINT fk_devices
FOREIGN KEY(device_id)
REFERENCES devices(device_id)