@jetthai/cuora 1.1.270-jackpot-1 → 1.1.270-jackpot-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.1.270-jackpot-2](https://github.com/jetthai/cuora-module/compare/v1.1.270-jackpot-1...v1.1.270-jackpot-2) (2024-05-17)
6
+
5
7
  ### [1.1.270-jackpot-1](https://github.com/jetthai/cuora-module/compare/v1.1.270...v1.1.270-jackpot-1) (2024-05-16)
6
8
 
7
9
  ### [1.1.270](https://github.com/jetthai/cuora-module/compare/v1.1.269...v1.1.270) (2024-05-16)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.270-jackpot-1",
3
+ "version": "1.1.270-jackpot-2",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -14,6 +14,7 @@ export default function (request) {
14
14
  activitiesDetailList: [],
15
15
  activityList: [],
16
16
  promotionList: [],
17
+ jackpotList: [],
17
18
  activityMap: {},
18
19
  tournamentList: [],
19
20
  refs: {},
@@ -34,7 +35,7 @@ export default function (request) {
34
35
  src: 'fetchList',
35
36
  onDone: {
36
37
  target: 'idle',
37
- actions: ['setActivityList', 'setTournamentList', 'setPromotionList'],
38
+ actions: ['setActivityList', 'setTournamentList', 'setPromotionList', 'setJackpotList'],
38
39
  },
39
40
  onError: {
40
41
  target: 'idle',
@@ -123,6 +124,12 @@ export default function (request) {
123
124
  promotionList,
124
125
  }
125
126
  }),
127
+ setJackpotList: assign((context, event) => {
128
+ const { jackpotList } = event.data
129
+ return {
130
+ jackpotList,
131
+ }
132
+ }),
126
133
  setActivitiesDetailList: assign((context, event) => {
127
134
  return {
128
135
  activitiesDetailList: event.data.map((item) => item.data),
@@ -162,12 +169,13 @@ export default function (request) {
162
169
  const hasToken = request.getToken()
163
170
  const isDoubleWallet = context.siteConfig?.walletMode === '4'
164
171
  const apiCallable = hasToken && isDoubleWallet
165
- const [{ data }, promotionList] = await Promise.all([
172
+ const [{ data }, promotionList, jackpotList] = await Promise.all([
166
173
  request.send(activity.getActivityList({ appSecret })),
167
174
  apiCallable ? request.send(payment.getPromotionsList()) : [],
175
+ request.send(activity.getJackpotList({ appSecret })),
168
176
  ])
169
177
 
170
- return { activityList: data, promotionList }
178
+ return { activityList: data, promotionList, jackpotList: jackpotList.data }
171
179
  },
172
180
  fetchActivitiesDetail: async (context, event) => {
173
181
  await new Promise((resolve) => setTimeout(resolve, 1000)) // delay 1 second