@jetthai/cuora 1.1.307-dev-2 → 1.1.307
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 -6
- package/package.json +1 -1
- package/src/api/activity.js +1 -1
- package/src/machine/honor_board_cash.js +8 -34
- package/src/machine/index.js +0 -2
- package/src/machine/withdraw/withdraw_krway.js +1 -14
- package/src/machine/withdraw/withdraw_manual.js +1 -16
- package/src/machine/withdraw/withdraw_vn.js +1 -14
- package/src/machine/withdraw/withdraw_vn2.js +1 -14
- package/src/machine/honor_board.js +0 -118
package/CHANGELOG.md
CHANGED
|
@@ -2,12 +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.307-dev-2](https://github.com/jetthai/cuora-module/compare/v1.0.307-dev-2...v1.1.307-dev-2) (2024-09-19)
|
|
6
|
-
|
|
7
|
-
### [1.0.307-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.307-dev-1...v1.0.307-dev-2) (2024-09-19)
|
|
8
|
-
|
|
9
|
-
### [1.1.307-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.307...v1.1.307-dev-1) (2024-09-18)
|
|
10
|
-
|
|
11
5
|
### [1.1.307](https://github.com/jetthai/cuora-module/compare/v1.1.306...v1.1.307) (2024-09-16)
|
|
12
6
|
|
|
13
7
|
### [1.1.306](https://github.com/jetthai/cuora-module/compare/v1.1.305...v1.1.306) (2024-09-16)
|
package/package.json
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -87,7 +87,7 @@ export default {
|
|
|
87
87
|
exchangeAward,
|
|
88
88
|
},
|
|
89
89
|
}),
|
|
90
|
-
|
|
90
|
+
getHonorBoard: (appSecret) => ({ url: 'activities/honorBoard', method: 'get', params: { appSecret }, isPublic: true }),
|
|
91
91
|
getInstantRebateCollectTime: () => ({ url: 'activities/rebate/collectTime', method: 'get' }),
|
|
92
92
|
instantRebateEstimate: () => ({ url: 'activities/rebate/estimate', method: 'get' }),
|
|
93
93
|
instantRebateCollect: () => ({ url: 'activities/rebate/collect', method: 'get' }),
|
|
@@ -9,14 +9,9 @@ export default function (request) {
|
|
|
9
9
|
initial: 'fetching',
|
|
10
10
|
context: {
|
|
11
11
|
tick: 6000,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
roulette: {},
|
|
16
|
-
jackpot: {},
|
|
17
|
-
bigWin: {},
|
|
18
|
-
maxBet: {},
|
|
19
|
-
withdraw: {},
|
|
12
|
+
bigWinList: [],
|
|
13
|
+
maxBetList: [],
|
|
14
|
+
withdrawList: [],
|
|
20
15
|
},
|
|
21
16
|
states: {
|
|
22
17
|
fetching: {
|
|
@@ -43,32 +38,11 @@ export default function (request) {
|
|
|
43
38
|
{
|
|
44
39
|
actions: {
|
|
45
40
|
setHonorBoardList: assign((context, event) => {
|
|
41
|
+
const { bigWinList = [], maxBetList = [], withdrawList = [] } = event.data
|
|
46
42
|
return {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return 'cashRain'
|
|
51
|
-
case 'DEPOSIT':
|
|
52
|
-
return 'deposit'
|
|
53
|
-
case 'FREE_ROULETTE_SPIN':
|
|
54
|
-
return 'roulette'
|
|
55
|
-
case 'JACKPOT':
|
|
56
|
-
return 'jackpot'
|
|
57
|
-
case 'WIN_SCORE':
|
|
58
|
-
return 'bigWin'
|
|
59
|
-
case 'WIN_MULTIPLIER':
|
|
60
|
-
return 'maxBet'
|
|
61
|
-
case 'WITHDRAW':
|
|
62
|
-
return 'withdraw'
|
|
63
|
-
}
|
|
64
|
-
}),
|
|
65
|
-
cashRain: (event.data || []).find((item) => item.type === 'CASH_RAIN') || {},
|
|
66
|
-
deposit: (event.data || []).find((item) => item.type === 'DEPOSIT') || {},
|
|
67
|
-
roulette: (event.data || []).find((item) => item.type === 'FREE_ROULETTE_SPIN') || {},
|
|
68
|
-
jackpot: (event.data || []).find((item) => item.type === 'JACKPOT') || {},
|
|
69
|
-
bigWin: (event.data || []).find((item) => item.type === 'WIN_SCORE') || {},
|
|
70
|
-
maxBet: (event.data || []).find((item) => item.type === 'WIN_MULTIPLIER') || {},
|
|
71
|
-
withdraw: (event.data || []).find((item) => item.type === 'WITHDRAW') || {},
|
|
43
|
+
bigWinList,
|
|
44
|
+
maxBetList,
|
|
45
|
+
withdrawList,
|
|
72
46
|
}
|
|
73
47
|
}),
|
|
74
48
|
},
|
|
@@ -80,7 +54,7 @@ export default function (request) {
|
|
|
80
54
|
},
|
|
81
55
|
services: {
|
|
82
56
|
fetchHonorBoardList: async (context, event) => {
|
|
83
|
-
const { data } = await request.send(activity.
|
|
57
|
+
const { data } = await request.send(activity.getHonorBoard(appSecret))
|
|
84
58
|
return data
|
|
85
59
|
},
|
|
86
60
|
},
|
package/src/machine/index.js
CHANGED
|
@@ -34,7 +34,6 @@ import vip_table from './vip_table.js'
|
|
|
34
34
|
import promotions from './promotions.js'
|
|
35
35
|
import roulette_v2 from './roulette_v2.js'
|
|
36
36
|
import honor_board_cash from './honor_board_cash.js'
|
|
37
|
-
import honor_board from './honor_board.js'
|
|
38
37
|
import user_photo from './user_photo.js'
|
|
39
38
|
import navbar from './navbar.js'
|
|
40
39
|
|
|
@@ -74,7 +73,6 @@ export default {
|
|
|
74
73
|
promotions,
|
|
75
74
|
roulette_v2,
|
|
76
75
|
honor_board_cash,
|
|
77
|
-
honor_board,
|
|
78
76
|
user_photo,
|
|
79
77
|
navbar,
|
|
80
78
|
...withdraw,
|
|
@@ -66,15 +66,6 @@ export default function (request) {
|
|
|
66
66
|
}
|
|
67
67
|
}),
|
|
68
68
|
},
|
|
69
|
-
{
|
|
70
|
-
target: 'passWithdrawCooldownTime',
|
|
71
|
-
cond: 'isPassWithdrawCooldownTime',
|
|
72
|
-
actions: assign((context, event) => {
|
|
73
|
-
return {
|
|
74
|
-
withdrawCheck: event.data,
|
|
75
|
-
}
|
|
76
|
-
}),
|
|
77
|
-
},
|
|
78
69
|
{
|
|
79
70
|
target: 'notWithdrawable',
|
|
80
71
|
cond: 'isNotWithdrawable',
|
|
@@ -89,7 +80,6 @@ export default function (request) {
|
|
|
89
80
|
},
|
|
90
81
|
},
|
|
91
82
|
notWithdrawMinDepositAmount: {},
|
|
92
|
-
passWithdrawCooldownTime: {},
|
|
93
83
|
inProcessing: {},
|
|
94
84
|
notWithdrawable: {},
|
|
95
85
|
withdrawable: {
|
|
@@ -180,10 +170,7 @@ export default function (request) {
|
|
|
180
170
|
return !enableWithdraw || balance < minWithdrawAmount
|
|
181
171
|
},
|
|
182
172
|
isNotWithdrawMinDepositAmount: (context, event) => {
|
|
183
|
-
return !event.data?.
|
|
184
|
-
},
|
|
185
|
-
isPassWithdrawCooldownTime: (context, event) => {
|
|
186
|
-
return !event.data?.passWithdrawCooldownTime
|
|
173
|
+
return !event.data?.enableWithdraw
|
|
187
174
|
},
|
|
188
175
|
},
|
|
189
176
|
services: {
|
|
@@ -168,7 +168,6 @@ export default function (request) {
|
|
|
168
168
|
invoke: {
|
|
169
169
|
src: 'withdrawCheck',
|
|
170
170
|
onDone: [
|
|
171
|
-
// 提款最低存款金額
|
|
172
171
|
{
|
|
173
172
|
target: 'notWithdrawMinDepositAmount',
|
|
174
173
|
cond: 'isNotWithdrawMinDepositAmount',
|
|
@@ -178,16 +177,6 @@ export default function (request) {
|
|
|
178
177
|
}
|
|
179
178
|
}),
|
|
180
179
|
},
|
|
181
|
-
// 提款冷卻時間
|
|
182
|
-
{
|
|
183
|
-
target: 'passWithdrawCooldownTime',
|
|
184
|
-
cond: 'isPassWithdrawCooldownTime',
|
|
185
|
-
actions: assign((context, event) => {
|
|
186
|
-
return {
|
|
187
|
-
withdrawCheck: event.data,
|
|
188
|
-
}
|
|
189
|
-
}),
|
|
190
|
-
},
|
|
191
180
|
{
|
|
192
181
|
target: 'notWithdrawable',
|
|
193
182
|
cond: 'isNotWithdrawable',
|
|
@@ -202,7 +191,6 @@ export default function (request) {
|
|
|
202
191
|
},
|
|
203
192
|
},
|
|
204
193
|
notWithdrawMinDepositAmount: {},
|
|
205
|
-
passWithdrawCooldownTime: {},
|
|
206
194
|
notWithdrawable: {},
|
|
207
195
|
unbound: {
|
|
208
196
|
// to bank_binding.js
|
|
@@ -525,10 +513,7 @@ export default function (request) {
|
|
|
525
513
|
return event.data?.status === 'otp-verifying'
|
|
526
514
|
},
|
|
527
515
|
isNotWithdrawMinDepositAmount: (context, event) => {
|
|
528
|
-
return !event.data?.
|
|
529
|
-
},
|
|
530
|
-
isPassWithdrawCooldownTime: (context, event) => {
|
|
531
|
-
return !event.data?.passWithdrawCooldownTime
|
|
516
|
+
return !event.data?.enableWithdraw
|
|
532
517
|
},
|
|
533
518
|
},
|
|
534
519
|
services: {
|
|
@@ -150,15 +150,6 @@ export default function (request) {
|
|
|
150
150
|
}
|
|
151
151
|
}),
|
|
152
152
|
},
|
|
153
|
-
{
|
|
154
|
-
target: 'passWithdrawCooldownTime',
|
|
155
|
-
cond: 'isPassWithdrawCooldownTime',
|
|
156
|
-
actions: assign((context, event) => {
|
|
157
|
-
return {
|
|
158
|
-
withdrawCheck: event.data,
|
|
159
|
-
}
|
|
160
|
-
}),
|
|
161
|
-
},
|
|
162
153
|
{
|
|
163
154
|
target: 'notWithdrawable',
|
|
164
155
|
cond: 'isNotWithdrawable',
|
|
@@ -173,7 +164,6 @@ export default function (request) {
|
|
|
173
164
|
},
|
|
174
165
|
},
|
|
175
166
|
notWithdrawMinDepositAmount: {},
|
|
176
|
-
passWithdrawCooldownTime: {},
|
|
177
167
|
notWithdrawable: {},
|
|
178
168
|
unbound: {
|
|
179
169
|
// to bank_binding.js
|
|
@@ -459,10 +449,7 @@ export default function (request) {
|
|
|
459
449
|
},
|
|
460
450
|
isNewWalletMode: (context, event) => context.siteConfig.walletMode > 0,
|
|
461
451
|
isNotWithdrawMinDepositAmount: (context, event) => {
|
|
462
|
-
return !event.data?.
|
|
463
|
-
},
|
|
464
|
-
isPassWithdrawCooldownTime: (context, event) => {
|
|
465
|
-
return !event.data?.passWithdrawCooldownTime
|
|
452
|
+
return !event.data?.enableWithdraw
|
|
466
453
|
},
|
|
467
454
|
},
|
|
468
455
|
services: {
|
|
@@ -178,15 +178,6 @@ export default function (request) {
|
|
|
178
178
|
}
|
|
179
179
|
}),
|
|
180
180
|
},
|
|
181
|
-
{
|
|
182
|
-
target: 'passWithdrawCooldownTime',
|
|
183
|
-
cond: 'isPassWithdrawCooldownTime',
|
|
184
|
-
actions: assign((context, event) => {
|
|
185
|
-
return {
|
|
186
|
-
withdrawCheck: event.data,
|
|
187
|
-
}
|
|
188
|
-
}),
|
|
189
|
-
},
|
|
190
181
|
{
|
|
191
182
|
target: 'notWithdrawable',
|
|
192
183
|
cond: 'isNotWithdrawable',
|
|
@@ -201,7 +192,6 @@ export default function (request) {
|
|
|
201
192
|
},
|
|
202
193
|
},
|
|
203
194
|
notWithdrawMinDepositAmount: {},
|
|
204
|
-
passWithdrawCooldownTime: {},
|
|
205
195
|
notWithdrawable: {},
|
|
206
196
|
unbound: {
|
|
207
197
|
// to bank_binding.js
|
|
@@ -484,10 +474,7 @@ export default function (request) {
|
|
|
484
474
|
return event.data?.status === 'otp-verifying'
|
|
485
475
|
},
|
|
486
476
|
isNotWithdrawMinDepositAmount: (context, event) => {
|
|
487
|
-
return !event.data?.
|
|
488
|
-
},
|
|
489
|
-
isPassWithdrawCooldownTime: (context, event) => {
|
|
490
|
-
return !event.data?.passWithdrawCooldownTime
|
|
477
|
+
return !event.data?.enableWithdraw
|
|
491
478
|
},
|
|
492
479
|
},
|
|
493
480
|
services: {
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { assign, createMachine } from 'xstate'
|
|
2
|
-
import activity from '../api/activity.js'
|
|
3
|
-
|
|
4
|
-
export default function (request) {
|
|
5
|
-
const { appSecret } = request.config
|
|
6
|
-
return createMachine(
|
|
7
|
-
{
|
|
8
|
-
id: 'honor_board',
|
|
9
|
-
type: 'parallel',
|
|
10
|
-
context: {
|
|
11
|
-
tick: 6000,
|
|
12
|
-
},
|
|
13
|
-
states: {
|
|
14
|
-
feed: {
|
|
15
|
-
initial: 'updating',
|
|
16
|
-
states: {
|
|
17
|
-
updating: {
|
|
18
|
-
invoke: {
|
|
19
|
-
src: 'fetchHonorBoardList',
|
|
20
|
-
onDone: {
|
|
21
|
-
target: 'waiting',
|
|
22
|
-
actions: 'setBroadcastList',
|
|
23
|
-
},
|
|
24
|
-
onError: {
|
|
25
|
-
target: 'waiting',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
waiting: {
|
|
30
|
-
after: {
|
|
31
|
-
TIMEOUT: {
|
|
32
|
-
target: 'updating',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
broadcast: {
|
|
39
|
-
initial: 'idle',
|
|
40
|
-
states: {
|
|
41
|
-
idle: {
|
|
42
|
-
on: {
|
|
43
|
-
START_BROADCAST: {
|
|
44
|
-
target: 'picking',
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
picking: {
|
|
49
|
-
after: {
|
|
50
|
-
5000: {
|
|
51
|
-
target: 'display',
|
|
52
|
-
actions: 'setBroadcast',
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
display: {
|
|
57
|
-
after: {
|
|
58
|
-
5000: {
|
|
59
|
-
target: 'picking',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
on: {
|
|
65
|
-
RESET_BROADCAST: {
|
|
66
|
-
target: '.idle',
|
|
67
|
-
actions: 'resetBroadcast',
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
delays: {
|
|
75
|
-
TIMEOUT: (context, event) => {
|
|
76
|
-
return context.tick * 10
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
actions: {
|
|
80
|
-
setBroadcastList: assign((context, event) => {
|
|
81
|
-
const broadcastList = (event.data || []).map((item) => item.data).flat()
|
|
82
|
-
const sortBroadcastList = broadcastList.sort((a, b) => {
|
|
83
|
-
if (!a.time) return -1
|
|
84
|
-
if (!b.time) return 1
|
|
85
|
-
return a.time - b.time
|
|
86
|
-
})
|
|
87
|
-
return { broadcastList: sortBroadcastList }
|
|
88
|
-
}),
|
|
89
|
-
setBroadcast: assign((context, event) => {
|
|
90
|
-
const { broadcastList = [], sentNormalBroadcastList = [], normalBroadcast = [] } = context
|
|
91
|
-
let sentNormalList = sentNormalBroadcastList
|
|
92
|
-
if (normalBroadcast) {
|
|
93
|
-
sentNormalList = [...sentNormalBroadcastList, normalBroadcast]
|
|
94
|
-
}
|
|
95
|
-
const nextNormalBroadcast = broadcastList?.find((broadcast) => {
|
|
96
|
-
return !sentNormalList.some((item) => item.broadcastId === broadcast.broadcastId)
|
|
97
|
-
})
|
|
98
|
-
return {
|
|
99
|
-
normalBroadcast: nextNormalBroadcast,
|
|
100
|
-
sentNormalBroadcastList: sentNormalList,
|
|
101
|
-
}
|
|
102
|
-
}),
|
|
103
|
-
resetBroadcast: assign((context, event) => {
|
|
104
|
-
return {
|
|
105
|
-
normalBroadcast: null,
|
|
106
|
-
sentNormalBroadcastList: [],
|
|
107
|
-
}
|
|
108
|
-
}),
|
|
109
|
-
},
|
|
110
|
-
services: {
|
|
111
|
-
fetchHonorBoardList: async (context, event) => {
|
|
112
|
-
const { data } = await request.send(activity.getHonorBroadcast(appSecret))
|
|
113
|
-
return data
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
}
|
|
117
|
-
)
|
|
118
|
-
}
|