fix: variable depth issue on machineScreenOpts

This commit is contained in:
Sérgio Salgado 2022-07-18 17:41:17 +01:00 committed by Rafael
parent 3b12dd5608
commit aef84142c7

View file

@ -61,11 +61,16 @@ const addReceiptInfo = receiptInfo => ret => {
}
const addMachineScreenOpts = addSmthInfo(
const addMachineScreenOpts = smth => _.update(
'screenOptions',
_.flow(
addSmthInfo(
'rates',
[
'rates.active'
'active'
]
)(smth.rates)
)
)
/* TODO: Simplify this. */
@ -163,7 +168,7 @@ const staticConfig = ({ currentConfigVersion, deviceId, deviceName, pq, settings
}),
addOperatorInfo(operatorInfo),
addReceiptInfo(receiptInfo),
addMachineScreenOpts(machineScreenOpts)
_.update('screenOptions', addMachineScreenOpts(machineScreenOpts))
)(staticConf))
}