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