@jetthai/cuora 1.1.278 → 1.1.279-dev-1

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,38 @@
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.279-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.279...v1.1.279-dev-1) (2024-06-06)
6
+
7
+ ### [1.1.279](https://github.com/jetthai/cuora-module/compare/v1.1.270-fix-6...v1.1.279) (2024-06-06)
8
+
9
+ ### [1.1.278](https://github.com/jetthai/cuora-module/compare/v1.1.270-fix-2...v1.1.278) (2024-06-04)
10
+
11
+ ### [1.1.277](https://github.com/jetthai/cuora-module/compare/v1.1.276...v1.1.277) (2024-05-31)
12
+
13
+ ### [1.1.276](https://github.com/jetthai/cuora-module/compare/v1.1.275...v1.1.276) (2024-05-31)
14
+
15
+ ### [1.1.275](https://github.com/jetthai/cuora-module/compare/v1.1.273-withdraw-6...v1.1.275) (2024-05-30)
16
+
17
+ ### [1.1.273-withdraw-6](https://github.com/jetthai/cuora-module/compare/v1.1.273-withdraw-5...v1.1.273-withdraw-6) (2024-05-29)
18
+
19
+ ### [1.1.273-withdraw-5](https://github.com/jetthai/cuora-module/compare/v1.1.270-fix...v1.1.273-withdraw-5) (2024-05-29)
20
+
21
+ ### [1.1.273-withdraw-4](https://github.com/jetthai/cuora-module/compare/v1.1.273-withdraw-3...v1.1.273-withdraw-4) (2024-05-29)
22
+
23
+ ### [1.1.273-withdraw-3](https://github.com/jetthai/cuora-module/compare/v1.1.273-withdraw-2...v1.1.273-withdraw-3) (2024-05-29)
24
+
25
+ ### [1.1.273-withdraw-2](https://github.com/jetthai/cuora-module/compare/v1.1.274...v1.1.273-withdraw-2) (2024-05-29)
26
+
27
+ ### [1.1.274](https://github.com/jetthai/cuora-module/compare/v1.1.273-withdraw-1...v1.1.274) (2024-05-28)
28
+
29
+ ### [1.1.273-withdraw-1](https://github.com/jetthai/cuora-module/compare/v1.1.273...v1.1.273-withdraw-1) (2024-05-28)
30
+
31
+ ### [1.1.273](https://github.com/jetthai/cuora-module/compare/v1.1.272...v1.1.273) (2024-05-27)
32
+
33
+ ### [1.1.272](https://github.com/jetthai/cuora-module/compare/v1.1.271...v1.1.272) (2024-05-21)
34
+
35
+ ### [1.1.271](https://github.com/jetthai/cuora-module/compare/v1.1.270...v1.1.271) (2024-05-21)
36
+
5
37
  ### [1.1.278](https://github.com/jetthai/cuora-module/compare/v1.1.277...v1.1.278) (2024-06-04)
6
38
 
7
39
  ### [1.1.277](https://github.com/jetthai/cuora-module/compare/v1.1.276...v1.1.277) (2024-05-31)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.278",
3
+ "version": "1.1.279-dev-1",
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
@@ -54,7 +54,7 @@ export default function (request) {
54
54
  actions: {
55
55
  setUserAccount: assign((context, event) => {
56
56
  return {
57
- userAccount: event.data.bankInfo?.[0],
57
+ userAccount: event.data?.[0],
58
58
  }
59
59
  }),
60
60
  setInitialization: assign((context, event) => {
@@ -69,12 +69,14 @@ export default function (request) {
69
69
  },
70
70
  guards: {
71
71
  hasUserAccount: (context, event) => {
72
- return event.data.bankInfo?.[0]
72
+ return event.data?.[0]
73
73
  },
74
74
  },
75
75
  services: {
76
76
  fetchPaymentInfo: async (context, event) => {
77
- return await request.send(payment.getPaymentInfo())
77
+ const { bankInfo } = await request.send(payment.getPaymentInfo())
78
+ const filterArray = bankInfo?.filter((item) => item.bindingType !== 'CRYPTO' && item.bindingType !== 'EWALLET')
79
+ return filterArray || []
78
80
  },
79
81
  initialize: async (context, event) => {
80
82
  const { method } = context
@@ -245,7 +245,7 @@ export default function (request) {
245
245
  actions: {
246
246
  setUserAccount: assign((context, event) => {
247
247
  return {
248
- userAccount: event.data.bankInfo?.[0],
248
+ userAccount: event.data?.[0],
249
249
  }
250
250
  }),
251
251
  setPromotion: assign((context, event) => {
@@ -310,7 +310,7 @@ export default function (request) {
310
310
  },
311
311
  guards: {
312
312
  hasUserAccount: (context, event) => {
313
- return event.data.bankInfo?.[0]
313
+ return event.data?.[0]
314
314
  },
315
315
  isGrandTotalEnable: (context, event) => {
316
316
  return context.grandTotalEnable === 1
@@ -318,7 +318,9 @@ export default function (request) {
318
318
  },
319
319
  services: {
320
320
  fetchPaymentInfo: async (context, event) => {
321
- return await request.send(payment.getPaymentInfo())
321
+ const { bankInfo } = await request.send(payment.getPaymentInfo())
322
+ const filterArray = bankInfo?.filter((item) => item.bindingType !== 'CRYPTO' && item.bindingType !== 'EWALLET')
323
+ return filterArray || []
322
324
  },
323
325
  initialize: async (context, event) => {
324
326
  const [{ config }, payments, bankList] = await Promise.all([
@@ -151,12 +151,14 @@ export default function (request, context) {
151
151
  return bank
152
152
  })
153
153
 
154
- const formattedPlayerBanks = playerBanks.map((bank) => {
155
- const foundBank = banks.find((item) => item.bankCode === bank.bankCode)
156
- bank.displayText = `${foundBank?.shortName} ${bank.accountNumber.slice(-5)}`
157
- bank.imageUrl = foundBank?.imageUrl
158
- return bank
159
- })
154
+ const formattedPlayerBanks = playerBanks
155
+ .filter((item) => item.bindingType !== 'CRYPTO' && item.bindingType !== 'EWALLET')
156
+ .map((bank) => {
157
+ const foundBank = banks.find((item) => item.bankCode === bank.bankCode)
158
+ bank.displayText = `${foundBank?.shortName} ${bank.accountNumber.slice(-5)}`
159
+ bank.imageUrl = foundBank?.imageUrl
160
+ return bank
161
+ })
160
162
 
161
163
  const userBanks = [
162
164
  ...formattedPlayerBanks,
@@ -265,11 +265,13 @@ export default function (request) {
265
265
  const banks = event.data
266
266
  const { playerBanks, houseBanks, selectedHouseBank } = context
267
267
 
268
- const formattedPlayerBanks = playerBanks.map((bank) => {
269
- bank.shortName = `${bank.bankCode} ${bank.accountNumber.slice(-5)}`
270
- bank.imageUrl = event.data.find((item) => item.bankCode === bank.bankCode)?.imageUrl
271
- return bank
272
- })
268
+ const formattedPlayerBanks = playerBanks
269
+ .filter((item) => item.bindingType !== 'CRYPTO' && item.bindingType !== 'EWALLET')
270
+ .map((bank) => {
271
+ bank.shortName = `${bank.bankCode} ${bank.accountNumber.slice(-5)}`
272
+ bank.imageUrl = event.data.find((item) => item.bankCode === bank.bankCode)?.imageUrl
273
+ return bank
274
+ })
273
275
 
274
276
  const userBanks = [...formattedPlayerBanks, ...banks]
275
277
 
@@ -235,7 +235,7 @@ export default function (request) {
235
235
  actions: {
236
236
  setUserAccount: assign((context, event) => {
237
237
  return {
238
- userAccount: event.data.bankInfo?.[0],
238
+ userAccount: event.data?.[0],
239
239
  }
240
240
  }),
241
241
  setBonusPreview: assign((context, event) => {
@@ -299,7 +299,7 @@ export default function (request) {
299
299
  },
300
300
  guards: {
301
301
  hasUserAccount: (context, event) => {
302
- return event.data.bankInfo?.[0]
302
+ return event.data?.[0]
303
303
  },
304
304
  hasPreviousOrder: (context, event) => {
305
305
  return event.data.order?.qrcode
@@ -310,7 +310,9 @@ export default function (request) {
310
310
  },
311
311
  services: {
312
312
  fetchPaymentInfo: async (context, event) => {
313
- return await request.send(payment.getPaymentInfo())
313
+ const { bankInfo } = await request.send(payment.getPaymentInfo())
314
+ const filterArray = bankInfo?.filter((item) => item.bindingType !== 'CRYPTO' && item.bindingType !== 'EWALLET')
315
+ return filterArray || []
314
316
  },
315
317
  initialize: async (context, event) => {
316
318
  const [{ config }, payments, bankList, order] = await Promise.all([