Chore: move fromNamespace call to configManager
This commit is contained in:
parent
61fec80899
commit
4ce1b949d0
3 changed files with 4 additions and 11 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue