Chore: move fromNamespace call to configManager
This commit is contained in:
parent
61fec80899
commit
4ce1b949d0
3 changed files with 4 additions and 11 deletions
|
|
@ -207,7 +207,7 @@ function sendTransactionMessage (rec, isHighValueTx) {
|
|||
// for notification center, check if type of notification is active before calling the respective notify function
|
||||
const notifyIfActive = (type, fnName, ...args) => {
|
||||
return settingsLoader.loadLatest().then(settings => {
|
||||
const notificationSettings = utils.fromNamespace('notificationCenter', configManager.getGlobalNotifications(settings.config))
|
||||
const notificationSettings = configManager.getGlobalNotifications(settings.config).notificationCenter
|
||||
if (!notificationCenter[fnName]) return Promise.reject(new Error(`Notification function ${fnName} for type ${type} does not exist`))
|
||||
if (!(notificationSettings.active && notificationSettings[type])) return Promise.resolve()
|
||||
return notificationCenter[fnName](...args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue