@jetthai/cuora 1.1.277-dev-3 → 1.1.277
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 +0 -72
- package/package.json +1 -1
- package/src/api/activity.js +0 -6
- package/src/machine/activity/activity.js +4 -12
- package/src/machine/activity/activity_cash.js +3 -11
- package/src/machine/deposit/amb.js +3 -5
- package/src/machine/deposit/float.js +3 -5
- package/src/machine/deposit/manual_cash.js +6 -8
- package/src/machine/deposit/manual_vn.js +5 -7
- package/src/machine/deposit/vpay.js +3 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,78 +2,6 @@
|
|
|
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.277-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.270-fix-6...v1.1.277-dev-3) (2024-06-05)
|
|
6
|
-
|
|
7
|
-
### [1.1.277-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.277-dev-1...v1.1.277-dev-2) (2024-06-04)
|
|
8
|
-
|
|
9
|
-
### [1.1.277-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.270-fix-2...v1.1.277-dev-1) (2024-06-04)
|
|
10
|
-
|
|
11
|
-
### [1.1.277-dev](https://github.com/jetthai/cuora-module/compare/v1.1.270-fix-1...v1.1.277-dev) (2024-06-03)
|
|
12
|
-
|
|
13
|
-
### [1.1.277](https://github.com/jetthai/cuora-module/compare/v1.1.276...v1.1.277) (2024-05-31)
|
|
14
|
-
|
|
15
|
-
### [1.1.276](https://github.com/jetthai/cuora-module/compare/v1.1.275...v1.1.276) (2024-05-31)
|
|
16
|
-
|
|
17
|
-
### [1.1.275](https://github.com/jetthai/cuora-module/compare/v1.1.273-withdraw-6...v1.1.275) (2024-05-30)
|
|
18
|
-
|
|
19
|
-
### [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)
|
|
20
|
-
|
|
21
|
-
### [1.1.273-withdraw-5](https://github.com/jetthai/cuora-module/compare/v1.1.270-fix...v1.1.273-withdraw-5) (2024-05-29)
|
|
22
|
-
|
|
23
|
-
### [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)
|
|
24
|
-
|
|
25
|
-
### [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)
|
|
26
|
-
|
|
27
|
-
### [1.1.273-withdraw-2](https://github.com/jetthai/cuora-module/compare/v1.1.274...v1.1.273-withdraw-2) (2024-05-29)
|
|
28
|
-
|
|
29
|
-
### [1.1.274](https://github.com/jetthai/cuora-module/compare/v1.1.273-withdraw-1...v1.1.274) (2024-05-28)
|
|
30
|
-
|
|
31
|
-
### [1.1.273-withdraw-1](https://github.com/jetthai/cuora-module/compare/v1.1.273...v1.1.273-withdraw-1) (2024-05-28)
|
|
32
|
-
|
|
33
|
-
### [1.1.273](https://github.com/jetthai/cuora-module/compare/v1.1.272-jackpot-1...v1.1.273) (2024-05-27)
|
|
34
|
-
|
|
35
|
-
### [1.1.272-jackpot-1](https://github.com/jetthai/cuora-module/compare/v1.1.272...v1.1.272-jackpot-1) (2024-05-23)
|
|
36
|
-
|
|
37
|
-
### [1.1.272](https://github.com/jetthai/cuora-module/compare/v1.1.271...v1.1.272) (2024-05-21)
|
|
38
|
-
|
|
39
|
-
### [1.1.271](https://github.com/jetthai/cuora-module/compare/v1.1.270...v1.1.271) (2024-05-21)
|
|
40
|
-
|
|
41
|
-
### [1.1.277-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.277-dev-1...v1.1.277-dev-2) (2024-06-04)
|
|
42
|
-
|
|
43
|
-
### [1.1.270-fix-2](https://github.com/jetthai/cuora-module/compare/v1.1.277-dev...v1.1.270-fix-2) (2024-06-03)
|
|
44
|
-
|
|
45
|
-
### [1.1.277-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.277-dev...v1.1.277-dev-1) (2024-06-04)
|
|
46
|
-
|
|
47
|
-
### [1.1.272-jackpot-1](https://github.com/jetthai/cuora-module/compare/v1.1.272...v1.1.272-jackpot-1) (2024-05-23)
|
|
48
|
-
|
|
49
|
-
### [1.1.277-dev](https://github.com/jetthai/cuora-module/compare/v1.1.270-fix-1...v1.1.277-dev) (2024-06-03)
|
|
50
|
-
|
|
51
|
-
### [1.1.277](https://github.com/jetthai/cuora-module/compare/v1.1.276...v1.1.277) (2024-05-31)
|
|
52
|
-
|
|
53
|
-
### [1.1.276](https://github.com/jetthai/cuora-module/compare/v1.1.275...v1.1.276) (2024-05-31)
|
|
54
|
-
|
|
55
|
-
### [1.1.275](https://github.com/jetthai/cuora-module/compare/v1.1.273-withdraw-6...v1.1.275) (2024-05-30)
|
|
56
|
-
|
|
57
|
-
### [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)
|
|
58
|
-
|
|
59
|
-
### [1.1.273-withdraw-5](https://github.com/jetthai/cuora-module/compare/v1.1.270-fix...v1.1.273-withdraw-5) (2024-05-29)
|
|
60
|
-
|
|
61
|
-
### [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)
|
|
62
|
-
|
|
63
|
-
### [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)
|
|
64
|
-
|
|
65
|
-
### [1.1.273-withdraw-2](https://github.com/jetthai/cuora-module/compare/v1.1.274...v1.1.273-withdraw-2) (2024-05-29)
|
|
66
|
-
|
|
67
|
-
### [1.1.274](https://github.com/jetthai/cuora-module/compare/v1.1.273-withdraw-1...v1.1.274) (2024-05-28)
|
|
68
|
-
|
|
69
|
-
### [1.1.273-withdraw-1](https://github.com/jetthai/cuora-module/compare/v1.1.273...v1.1.273-withdraw-1) (2024-05-28)
|
|
70
|
-
|
|
71
|
-
### [1.1.273](https://github.com/jetthai/cuora-module/compare/v1.1.272...v1.1.273) (2024-05-27)
|
|
72
|
-
|
|
73
|
-
### [1.1.272](https://github.com/jetthai/cuora-module/compare/v1.1.271...v1.1.272) (2024-05-21)
|
|
74
|
-
|
|
75
|
-
### [1.1.271](https://github.com/jetthai/cuora-module/compare/v1.1.270...v1.1.271) (2024-05-21)
|
|
76
|
-
|
|
77
5
|
### [1.1.277](https://github.com/jetthai/cuora-module/compare/v1.1.276...v1.1.277) (2024-05-31)
|
|
78
6
|
|
|
79
7
|
### [1.1.276](https://github.com/jetthai/cuora-module/compare/v1.1.275...v1.1.276) (2024-05-31)
|
package/package.json
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -6,12 +6,6 @@ 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
|
-
}),
|
|
15
9
|
getTournamentDetail: ({ activityNo, appSecret }) => ({
|
|
16
10
|
url: 'tournament/detail',
|
|
17
11
|
method: 'get',
|
|
@@ -10,11 +10,10 @@ export default function (request) {
|
|
|
10
10
|
initial: 'init',
|
|
11
11
|
context: {
|
|
12
12
|
tick: 2000,
|
|
13
|
-
specifyActivities: [
|
|
13
|
+
specifyActivities: [29, 34],
|
|
14
14
|
activitiesDetailList: [],
|
|
15
15
|
activityList: [],
|
|
16
16
|
promotionList: [],
|
|
17
|
-
jackpotList: [],
|
|
18
17
|
activityMap: {},
|
|
19
18
|
tournamentList: [],
|
|
20
19
|
refs: {},
|
|
@@ -35,7 +34,7 @@ export default function (request) {
|
|
|
35
34
|
src: 'fetchList',
|
|
36
35
|
onDone: {
|
|
37
36
|
target: 'idle',
|
|
38
|
-
actions: ['setActivityList', 'setTournamentList', 'setPromotionList'
|
|
37
|
+
actions: ['setActivityList', 'setTournamentList', 'setPromotionList'],
|
|
39
38
|
},
|
|
40
39
|
onError: {
|
|
41
40
|
target: 'idle',
|
|
@@ -124,12 +123,6 @@ export default function (request) {
|
|
|
124
123
|
promotionList,
|
|
125
124
|
}
|
|
126
125
|
}),
|
|
127
|
-
setJackpotList: assign((context, event) => {
|
|
128
|
-
const { jackpotList } = event.data
|
|
129
|
-
return {
|
|
130
|
-
jackpotList,
|
|
131
|
-
}
|
|
132
|
-
}),
|
|
133
126
|
setActivitiesDetailList: assign((context, event) => {
|
|
134
127
|
return {
|
|
135
128
|
activitiesDetailList: event.data.map((item) => item.data),
|
|
@@ -169,13 +162,12 @@ export default function (request) {
|
|
|
169
162
|
const hasToken = request.getToken()
|
|
170
163
|
const isDoubleWallet = context.siteConfig?.walletMode === '4'
|
|
171
164
|
const apiCallable = hasToken && isDoubleWallet
|
|
172
|
-
const [{ data }, promotionList
|
|
165
|
+
const [{ data }, promotionList] = await Promise.all([
|
|
173
166
|
request.send(activity.getActivityList({ appSecret })),
|
|
174
167
|
apiCallable ? request.send(payment.getPromotionsList()) : [],
|
|
175
|
-
request.send(activity.getJackpotList({ appSecret })),
|
|
176
168
|
])
|
|
177
169
|
|
|
178
|
-
return { activityList: data, promotionList
|
|
170
|
+
return { activityList: data, promotionList }
|
|
179
171
|
},
|
|
180
172
|
fetchActivitiesDetail: async (context, event) => {
|
|
181
173
|
await new Promise((resolve) => setTimeout(resolve, 1000)) // delay 1 second
|
|
@@ -13,7 +13,6 @@ export default function (request) {
|
|
|
13
13
|
activityList: [],
|
|
14
14
|
tournamentList: [],
|
|
15
15
|
promotionList: [],
|
|
16
|
-
jackpotList: [],
|
|
17
16
|
uidSite: '',
|
|
18
17
|
detailNeededActivityTypes: [29, 34],
|
|
19
18
|
activityDetailList: [],
|
|
@@ -24,7 +23,7 @@ export default function (request) {
|
|
|
24
23
|
src: 'fetchList',
|
|
25
24
|
onDone: {
|
|
26
25
|
target: 'checking',
|
|
27
|
-
actions: ['setActivityList', 'setTournamentList', 'setPromotionList'
|
|
26
|
+
actions: ['setActivityList', 'setTournamentList', 'setPromotionList'],
|
|
28
27
|
},
|
|
29
28
|
onError: {
|
|
30
29
|
target: 'pending',
|
|
@@ -97,12 +96,6 @@ export default function (request) {
|
|
|
97
96
|
promotionList,
|
|
98
97
|
}
|
|
99
98
|
}),
|
|
100
|
-
setJackpotList: assign((context, event) => {
|
|
101
|
-
const { jackpotList } = event.data
|
|
102
|
-
return {
|
|
103
|
-
jackpotList,
|
|
104
|
-
}
|
|
105
|
-
}),
|
|
106
99
|
setUnread: assign((context, event) => {
|
|
107
100
|
const { uidSite, activityNo, unread } = event.data
|
|
108
101
|
const list = JSON.parse(JSON.stringify(context.activityList))
|
|
@@ -139,13 +132,12 @@ export default function (request) {
|
|
|
139
132
|
services: {
|
|
140
133
|
fetchList: async (context, event) => {
|
|
141
134
|
const hasToken = request.getToken()
|
|
142
|
-
const [{ data }, promotionList
|
|
135
|
+
const [{ data }, promotionList] = await Promise.all([
|
|
143
136
|
request.send(activity.getActivityList({ appSecret })),
|
|
144
137
|
hasToken ? request.send(payment.getPromotionsList()) : [],
|
|
145
|
-
request.send(activity.getJackpotList({ appSecret })),
|
|
146
138
|
])
|
|
147
139
|
|
|
148
|
-
return { activityList: data, promotionList
|
|
140
|
+
return { activityList: data, promotionList }
|
|
149
141
|
},
|
|
150
142
|
fetchActivityDetailList: async (context, event) => {
|
|
151
143
|
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?.[0],
|
|
57
|
+
userAccount: event.data.bankInfo?.[0],
|
|
58
58
|
}
|
|
59
59
|
}),
|
|
60
60
|
setInitialization: assign((context, event) => {
|
|
@@ -69,14 +69,12 @@ export default function (request) {
|
|
|
69
69
|
},
|
|
70
70
|
guards: {
|
|
71
71
|
hasUserAccount: (context, event) => {
|
|
72
|
-
return event.data?.[0]
|
|
72
|
+
return event.data.bankInfo?.[0]
|
|
73
73
|
},
|
|
74
74
|
},
|
|
75
75
|
services: {
|
|
76
76
|
fetchPaymentInfo: async (context, event) => {
|
|
77
|
-
|
|
78
|
-
const filterArray = bankInfo?.filter((item) => item.bindingType !== 'CRYPTO' && item.bindingType !== 'EWALLET')
|
|
79
|
-
return filterArray || []
|
|
77
|
+
return await request.send(payment.getPaymentInfo())
|
|
80
78
|
},
|
|
81
79
|
initialize: async (context, event) => {
|
|
82
80
|
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?.[0],
|
|
248
|
+
userAccount: event.data.bankInfo?.[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?.[0]
|
|
313
|
+
return event.data.bankInfo?.[0]
|
|
314
314
|
},
|
|
315
315
|
isGrandTotalEnable: (context, event) => {
|
|
316
316
|
return context.grandTotalEnable === 1
|
|
@@ -318,9 +318,7 @@ export default function (request) {
|
|
|
318
318
|
},
|
|
319
319
|
services: {
|
|
320
320
|
fetchPaymentInfo: async (context, event) => {
|
|
321
|
-
|
|
322
|
-
const filterArray = bankInfo?.filter((item) => item.bindingType !== 'CRYPTO' && item.bindingType !== 'EWALLET')
|
|
323
|
-
return filterArray || []
|
|
321
|
+
return await request.send(payment.getPaymentInfo())
|
|
324
322
|
},
|
|
325
323
|
initialize: async (context, event) => {
|
|
326
324
|
const [{ config }, payments, bankList] = await Promise.all([
|
|
@@ -151,14 +151,12 @@ export default function (request, context) {
|
|
|
151
151
|
return bank
|
|
152
152
|
})
|
|
153
153
|
|
|
154
|
-
const formattedPlayerBanks = playerBanks
|
|
155
|
-
.
|
|
156
|
-
.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
return bank
|
|
161
|
-
})
|
|
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
|
+
})
|
|
162
160
|
|
|
163
161
|
const userBanks = [
|
|
164
162
|
...formattedPlayerBanks,
|
|
@@ -265,13 +265,11 @@ export default function (request) {
|
|
|
265
265
|
const banks = event.data
|
|
266
266
|
const { playerBanks, houseBanks, selectedHouseBank } = context
|
|
267
267
|
|
|
268
|
-
const formattedPlayerBanks = playerBanks
|
|
269
|
-
.
|
|
270
|
-
.
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
return bank
|
|
274
|
-
})
|
|
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
|
+
})
|
|
275
273
|
|
|
276
274
|
const userBanks = [...formattedPlayerBanks, ...banks]
|
|
277
275
|
|
|
@@ -235,7 +235,7 @@ export default function (request) {
|
|
|
235
235
|
actions: {
|
|
236
236
|
setUserAccount: assign((context, event) => {
|
|
237
237
|
return {
|
|
238
|
-
userAccount: event.data?.[0],
|
|
238
|
+
userAccount: event.data.bankInfo?.[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?.[0]
|
|
302
|
+
return event.data.bankInfo?.[0]
|
|
303
303
|
},
|
|
304
304
|
hasPreviousOrder: (context, event) => {
|
|
305
305
|
return event.data.order?.qrcode
|
|
@@ -310,9 +310,7 @@ export default function (request) {
|
|
|
310
310
|
},
|
|
311
311
|
services: {
|
|
312
312
|
fetchPaymentInfo: async (context, event) => {
|
|
313
|
-
|
|
314
|
-
const filterArray = bankInfo?.filter((item) => item.bindingType !== 'CRYPTO' && item.bindingType !== 'EWALLET')
|
|
315
|
-
return filterArray || []
|
|
313
|
+
return await request.send(payment.getPaymentInfo())
|
|
316
314
|
},
|
|
317
315
|
initialize: async (context, event) => {
|
|
318
316
|
const [{ config }, payments, bankList, order] = await Promise.all([
|