fix: always send areThereAvailablePromoCodes

This field is not covered by the version of the `user_config` table.
This commit is contained in:
André Sá 2022-07-04 18:14:43 +01:00 committed by André Sá
parent 2ec09de962
commit 6ab5dbbd7d
2 changed files with 4 additions and 4 deletions

View file

@ -96,7 +96,6 @@ const staticConfig = ({ currentConfigVersion, deviceId, deviceName, pq, settings
const staticConf = _.flow(
_.pick([
'areThereAvailablePromoCodes',
'coins',
'configVersion',
'timezone'
@ -171,7 +170,7 @@ const dynamicConfig = ({ deviceId, operatorId, pid, pq, settings, }) => {
state.pids = _.update(operatorId, _.set(deviceId, { pid, ts: Date.now() }), state.pids)
return _.flow(
_.pick(['balances', 'cassettes', 'coins', 'rates']),
_.pick(['areThereAvailablePromoCodes', 'balances', 'cassettes', 'coins', 'rates']),
_.update('cassettes', massageCassettes),
@ -186,7 +185,8 @@ const dynamicConfig = ({ deviceId, operatorId, pid, pq, settings, }) => {
/* Group the separate objects by cryptoCode */
/* { balances, coins, rates } => { cryptoCode: { balance, ask, bid, cashIn, cashOut }, ... } */
({ balances, cassettes, coins, rates }) => ({
({ areThereAvailablePromoCodes, balances, cassettes, coins, rates }) => ({
areThereAvailablePromoCodes,
cassettes,
coins: _.flow(
_.reduce(