@jetthai/cuora 1.1.286 → 1.1.287-dev-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,12 @@
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.287-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.287-dev-1...v1.1.287-dev-2) (2024-07-11)
6
+
7
+ ### [1.1.287-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.287...v1.1.287-dev-1) (2024-07-10)
8
+
9
+ ### [1.1.287](https://github.com/jetthai/cuora-module/compare/v1.1.286...v1.1.287) (2024-07-09)
10
+
5
11
  ### [1.1.286](https://github.com/jetthai/cuora-module/compare/v1.1.285...v1.1.286) (2024-07-01)
6
12
 
7
13
  ### [1.1.285](https://github.com/jetthai/cuora-module/compare/v1.1.283...v1.1.285) (2024-06-24)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.286",
3
+ "version": "1.1.287-dev-2",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -6,6 +6,12 @@ export default {
6
6
  params: { appSecret, include },
7
7
  isPublic: true,
8
8
  }),
9
+ getJackpotList: ({ appSecret }) => ({
10
+ url: 'activities/jackpot/list',
11
+ method: 'get',
12
+ params: { appSecret },
13
+ isPublic: true,
14
+ }),
9
15
  getTournamentDetail: ({ activityNo, appSecret }) => ({
10
16
  url: 'tournament/detail',
11
17
  method: 'get',
@@ -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
@@ -13,6 +13,7 @@ export default function (request) {
13
13
  activityList: [],
14
14
  tournamentList: [],
15
15
  promotionList: [],
16
+ jackpotList: [],
16
17
  uidSite: '',
17
18
  detailNeededActivityTypes: [29, 34],
18
19
  activityDetailList: [],
@@ -23,7 +24,7 @@ export default function (request) {
23
24
  src: 'fetchList',
24
25
  onDone: {
25
26
  target: 'checking',
26
- actions: ['setActivityList', 'setTournamentList', 'setPromotionList'],
27
+ actions: ['setActivityList', 'setTournamentList', 'setPromotionList', 'setJackpotList'],
27
28
  },
28
29
  onError: {
29
30
  target: 'pending',
@@ -96,6 +97,12 @@ export default function (request) {
96
97
  promotionList,
97
98
  }
98
99
  }),
100
+ setJackpotList: assign((context, event) => {
101
+ const { jackpotList } = event.data
102
+ return {
103
+ jackpotList,
104
+ }
105
+ }),
99
106
  setUnread: assign((context, event) => {
100
107
  const { uidSite, activityNo, unread } = event.data
101
108
  const list = JSON.parse(JSON.stringify(context.activityList))
@@ -132,12 +139,13 @@ export default function (request) {
132
139
  services: {
133
140
  fetchList: async (context, event) => {
134
141
  const hasToken = request.getToken()
135
- const [{ data }, promotionList] = await Promise.all([
142
+ const [{ data }, promotionList, jackpotList] = await Promise.all([
136
143
  request.send(activity.getActivityList({ appSecret })),
137
144
  hasToken ? request.send(payment.getPromotionsList()) : [],
145
+ request.send(activity.getJackpotList({ appSecret })),
138
146
  ])
139
147
 
140
- return { activityList: data, promotionList }
148
+ return { activityList: data, promotionList, jackpotList: jackpotList.data }
141
149
  },
142
150
  fetchActivityDetailList: async (context, event) => {
143
151
  await new Promise((resolve) => setTimeout(resolve, 1000)) // delay 1 second
@@ -194,7 +194,7 @@ export default function (request) {
194
194
  selectedAddress: defaultAddresses[0],
195
195
  options: defaultCrypto[0]?.optional,
196
196
  currentPayment,
197
- processing: currentPayment.processing?.[0],
197
+ processing: cryptoBank.processing?.[0],
198
198
  }
199
199
  }),
200
200
  setCrypto: assign((context, event) => {
@@ -93,8 +93,8 @@ export default function (request) {
93
93
  }),
94
94
  setResult: assign((context, event) => {
95
95
  const { resultMap, selectedCrypto } = context
96
- const { accountNumber, currency, network, qrcode, forexRate } = event.data
97
- const result = { accountNumber, currency, network, qrcode, forexRate }
96
+ const { accountNumber, action, currency, network, qrcode, forexRate } = event.data
97
+ const result = { accountNumber, action, currency, network, qrcode, forexRate }
98
98
 
99
99
  return {
100
100
  result,
@@ -74,6 +74,9 @@ export default function (request) {
74
74
  target: 'connecting',
75
75
  actions: ['setGameInfo', 'setLang'],
76
76
  },
77
+ UPDATE: {
78
+ target: 'updating',
79
+ },
77
80
  },
78
81
  },
79
82
  batchFetching: {
@@ -113,6 +116,18 @@ export default function (request) {
113
116
  { target: 'idle' },
114
117
  ],
115
118
  },
119
+ updating: {
120
+ invoke: {
121
+ src: 'updatePageContent',
122
+ onDone: {
123
+ target: 'idle',
124
+ actions: 'swapContent',
125
+ },
126
+ onError: {
127
+ target: 'idle',
128
+ },
129
+ },
130
+ },
116
131
  connecting: {
117
132
  invoke: {
118
133
  src: 'connectGame',
@@ -315,7 +330,7 @@ export default function (request) {
315
330
  if (room.categoryId === GAME_SEARCH) {
316
331
  return
317
332
  } else if (additionEnable) {
318
- const [content, addition] = event.data
333
+ const [content, addition = {}] = event.data
319
334
  return {
320
335
  content: {
321
336
  ...context.content,