diff --git a/lib/graphql/resolvers.js b/lib/graphql/resolvers.js index 29101102..070b0a04 100644 --- a/lib/graphql/resolvers.js +++ b/lib/graphql/resolvers.js @@ -61,11 +61,16 @@ const addReceiptInfo = receiptInfo => ret => { } -const addMachineScreenOpts = addSmthInfo( +const addMachineScreenOpts = smth => _.update( 'screenOptions', - [ - 'rates.active' - ] + _.flow( + addSmthInfo( + 'rates', + [ + '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)) }