fix: always send areThereAvailablePromoCodes
This field is not covered by the version of the `user_config` table.
This commit is contained in:
parent
2ec09de962
commit
6ab5dbbd7d
2 changed files with 4 additions and 4 deletions
|
|
@ -96,7 +96,6 @@ const staticConfig = ({ currentConfigVersion, deviceId, deviceName, pq, settings
|
||||||
|
|
||||||
const staticConf = _.flow(
|
const staticConf = _.flow(
|
||||||
_.pick([
|
_.pick([
|
||||||
'areThereAvailablePromoCodes',
|
|
||||||
'coins',
|
'coins',
|
||||||
'configVersion',
|
'configVersion',
|
||||||
'timezone'
|
'timezone'
|
||||||
|
|
@ -171,7 +170,7 @@ const dynamicConfig = ({ deviceId, operatorId, pid, pq, settings, }) => {
|
||||||
state.pids = _.update(operatorId, _.set(deviceId, { pid, ts: Date.now() }), state.pids)
|
state.pids = _.update(operatorId, _.set(deviceId, { pid, ts: Date.now() }), state.pids)
|
||||||
|
|
||||||
return _.flow(
|
return _.flow(
|
||||||
_.pick(['balances', 'cassettes', 'coins', 'rates']),
|
_.pick(['areThereAvailablePromoCodes', 'balances', 'cassettes', 'coins', 'rates']),
|
||||||
|
|
||||||
_.update('cassettes', massageCassettes),
|
_.update('cassettes', massageCassettes),
|
||||||
|
|
||||||
|
|
@ -186,7 +185,8 @@ const dynamicConfig = ({ deviceId, operatorId, pid, pq, settings, }) => {
|
||||||
|
|
||||||
/* Group the separate objects by cryptoCode */
|
/* Group the separate objects by cryptoCode */
|
||||||
/* { balances, coins, rates } => { cryptoCode: { balance, ask, bid, cashIn, cashOut }, ... } */
|
/* { balances, coins, rates } => { cryptoCode: { balance, ask, bid, cashIn, cashOut }, ... } */
|
||||||
({ balances, cassettes, coins, rates }) => ({
|
({ areThereAvailablePromoCodes, balances, cassettes, coins, rates }) => ({
|
||||||
|
areThereAvailablePromoCodes,
|
||||||
cassettes,
|
cassettes,
|
||||||
coins: _.flow(
|
coins: _.flow(
|
||||||
_.reduce(
|
_.reduce(
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,6 @@ type Terms {
|
||||||
type StaticConfig {
|
type StaticConfig {
|
||||||
configVersion: Int!
|
configVersion: Int!
|
||||||
|
|
||||||
areThereAvailablePromoCodes: Boolean!
|
|
||||||
coins: [Coin!]!
|
coins: [Coin!]!
|
||||||
enablePaperWalletOnly: Boolean!
|
enablePaperWalletOnly: Boolean!
|
||||||
hasLightning: Boolean!
|
hasLightning: Boolean!
|
||||||
|
|
@ -137,6 +136,7 @@ type Cassettes {
|
||||||
}
|
}
|
||||||
|
|
||||||
type DynamicConfig {
|
type DynamicConfig {
|
||||||
|
areThereAvailablePromoCodes: Boolean!
|
||||||
cassettes: Cassettes
|
cassettes: Cassettes
|
||||||
coins: [DynamicCoinValues!]!
|
coins: [DynamicCoinValues!]!
|
||||||
reboot: Boolean!
|
reboot: Boolean!
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue