From 1395448e78317504fd2ddfde14a17fce7c02a503 Mon Sep 17 00:00:00 2001 From: siiky Date: Mon, 28 Oct 2024 16:27:23 +0000 Subject: [PATCH] feat: add notif message for `LOW_RECYCLER_STACKER` --- lib/notifier/codes.js | 2 ++ lib/notifier/notificationCenter.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/lib/notifier/codes.js b/lib/notifier/codes.js index cb7da476..b0e02895 100644 --- a/lib/notifier/codes.js +++ b/lib/notifier/codes.js @@ -6,6 +6,7 @@ const LOW_CRYPTO_BALANCE = 'LOW_CRYPTO_BALANCE' const HIGH_CRYPTO_BALANCE = 'HIGH_CRYPTO_BALANCE' const CASH_BOX_FULL = 'CASH_BOX_FULL' const LOW_CASH_OUT = 'LOW_CASH_OUT' +const LOW_RECYCLER_STACKER = 'LOW_RECYCLER_STACKER' const SECURITY = 'SECURITY' const CODES_DISPLAY = { @@ -41,6 +42,7 @@ module.exports = { HIGH_CRYPTO_BALANCE, CASH_BOX_FULL, LOW_CASH_OUT, + LOW_RECYCLER_STACKER, SECURITY, CODES_DISPLAY, NETWORK_DOWN_TIME, diff --git a/lib/notifier/notificationCenter.js b/lib/notifier/notificationCenter.js index b53ca4eb..5b143bdd 100644 --- a/lib/notifier/notificationCenter.js +++ b/lib/notifier/notificationCenter.js @@ -21,6 +21,7 @@ const { LOW_CRYPTO_BALANCE, CASH_BOX_FULL, LOW_CASH_OUT, + LOW_RECYCLER_STACKER, } = require('./codes') const sanctionsNotify = (customer, phone) => { @@ -79,6 +80,8 @@ const fiatBalancesNotify = (fiatWarnings) => { }, notInvalidated)) return const message = balance.code === LOW_CASH_OUT ? `Cash-out cassette ${balance.cassette} low or empty!` : + balance.code === LOW_RECYCLER_STACKER ? + `Recycler ${balance.cassette} low or empty!` : balance.code === CASH_BOX_FULL ? `Cash box full or almost full!` : `Cash box full or almost full!` /* Shouldn't happen */