Chore: move fromNamespace call to configManager

This commit is contained in:
csrapr 2021-03-01 16:23:02 +00:00 committed by Josh Harvey
parent 61fec80899
commit 4ce1b949d0
3 changed files with 4 additions and 11 deletions

View file

@ -72,6 +72,7 @@ const getNotifications = (cryptoCurrency, machine, config) => {
const smsSettings = fromNamespace('sms', notifications)
const emailSettings = fromNamespace('email', notifications)
const notificationCenterSettings = fromNamespace('notificationCenter', notifications)
const notifNoOverrides = _.omit(['cryptoBalanceOverrides', 'fiatBalanceOverrides'], notifications)
@ -96,8 +97,7 @@ const getNotifications = (cryptoCurrency, machine, config) => {
const getFiatSettings = _.compose(_.pick(fiatFields), _.defaultTo(notifications), findByMachine)
const fiatSettings = getFiatSettings(notifications.fiatBalanceOverrides)
return { ...notifNoOverrides, sms: smsSettings, email: emailSettings, ...cryptoSettings, ...fiatSettings }
return { ...notifNoOverrides, sms: smsSettings, email: emailSettings, ...cryptoSettings, ...fiatSettings, notificationCenter: notificationCenterSettings }
}
const getGlobalNotifications = config => getNotifications(null, null, config)