feat: add discount source column to transaction tables
fix: move individual discounts to phone code response instead of poller
This commit is contained in:
parent
e837ee3e7a
commit
b0fa62a9f3
6 changed files with 32 additions and 12 deletions
|
|
@ -230,7 +230,6 @@ function plugins (settings, deviceId) {
|
|||
const pingPromise = recordPing(deviceTime, machineVersion, machineModel)
|
||||
const currentConfigVersionPromise = fetchCurrentConfigVersion()
|
||||
const currentAvailablePromoCodes = loyalty.getNumberOfAvailablePromoCodes()
|
||||
const currentAvailableIndividualDiscounts = loyalty.getAvailableIndividualDiscounts()
|
||||
const timezoneObj = { utcOffset: timezone[0], dstOffset: timezone[1] }
|
||||
|
||||
const promises = [
|
||||
|
|
@ -242,8 +241,7 @@ function plugins (settings, deviceId) {
|
|||
tickerPromises,
|
||||
balancePromises,
|
||||
testnetPromises,
|
||||
currentAvailablePromoCodes,
|
||||
currentAvailableIndividualDiscounts
|
||||
currentAvailablePromoCodes
|
||||
)
|
||||
|
||||
return Promise.all(promises)
|
||||
|
|
@ -257,8 +255,7 @@ function plugins (settings, deviceId) {
|
|||
const testNets = arr.slice(2 * cryptoCodesCount + 4, arr.length - 2)
|
||||
const coinParams = _.zip(cryptoCodes, testNets)
|
||||
const coinsWithoutRate = _.map(mapCoinSettings, coinParams)
|
||||
const areThereAvailablePromoCodes = arr[arr.length - 2] > 0
|
||||
const individualDiscounts = arr[arr.length - 1]
|
||||
const areThereAvailablePromoCodes = arr[arr.length - 1] > 0
|
||||
|
||||
return {
|
||||
cassettes,
|
||||
|
|
@ -267,8 +264,7 @@ function plugins (settings, deviceId) {
|
|||
coins: _.zipWith(_.assign, coinsWithoutRate, tickers),
|
||||
configVersion,
|
||||
areThereAvailablePromoCodes,
|
||||
timezone: tz,
|
||||
individualDiscounts
|
||||
timezone: tz
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue