@jetthai/cuora 1.1.353-dev-19 → 1.1.353
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 -102
- package/package.json +1 -1
- package/src/api/activity.js +0 -5
- package/src/api/game.js +0 -1
- package/src/api/index.js +1 -2
- package/src/machine/activity/activity.js +10 -7
- package/src/machine/activity/activity_cash.js +4 -0
- package/src/machine/activity/vip_card_activity.js +31 -78
- package/src/machine/common.js +0 -6
- package/src/machine/deposit/direct.js +6 -2
- package/src/machine/deposit/float.js +2 -2
- package/src/machine/deposit/loadcard_vn.js +51 -10
- package/src/machine/deposit/manual_vn.js +23 -3
- package/src/machine/deposit/qrcode_v2.js +132 -6
- package/src/machine/deposit/virtual_bank_vn.js +31 -3
- package/src/machine/deposit/vpay.js +2 -2
- package/src/machine/game_search_cash.js +1 -1
- package/src/machine/game_search_v2.js +1 -1
- package/src/machine/game_v2_1.js +11 -63
- package/src/machine/index.js +0 -2
- package/src/machine/promotions.js +5 -4
- package/src/machine/reward.js +1 -1
- package/src/machine/reward_cash.js +15 -1
- package/src/machine/setting.js +0 -7
- package/src/machine/websocket.js +0 -12
- package/src/machine/withdraw/withdraw_crypto.js +3 -1
- package/src/machine/withdraw/withdraw_crypto2.js +1 -1
- package/src/machine/withdraw/withdraw_manual.js +2 -1
- package/src/machine/withdraw/withdraw_vn.js +3 -1
- package/src/machine/withdraw/withdraw_vn2.js +1 -1
- package/src/api/ranking.js +0 -27
- package/src/machine/ranking.js +0 -216
|
@@ -49,8 +49,16 @@ export default function (request) {
|
|
|
49
49
|
target: 'fetching',
|
|
50
50
|
cond: (context, event) => {
|
|
51
51
|
const { siteConfig = {}, promotion = {}, selectedQrcode } = context
|
|
52
|
-
const { bonusPreviewEnable } = siteConfig
|
|
53
|
-
return !!selectedQrcode && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
52
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
53
|
+
return !!selectedQrcode && walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
target: 'debouncing',
|
|
58
|
+
actions: 'setPromotionDefaultAmount',
|
|
59
|
+
cond: (context, event) => {
|
|
60
|
+
const { siteConfig = {}, promotion = {} } = context
|
|
61
|
+
return siteConfig.walletMode === '3' && !!promotion?.minimumAmount
|
|
54
62
|
},
|
|
55
63
|
},
|
|
56
64
|
{ target: 'loaded' },
|
|
@@ -78,21 +86,51 @@ export default function (request) {
|
|
|
78
86
|
actions: 'setQrcode',
|
|
79
87
|
cond: (context, event) => {
|
|
80
88
|
const { siteConfig = {}, promotion = {} } = context
|
|
81
|
-
const { bonusPreviewEnable } = siteConfig
|
|
82
|
-
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
89
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
90
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
83
91
|
},
|
|
84
92
|
},
|
|
93
|
+
{
|
|
94
|
+
target: 'debouncing',
|
|
95
|
+
actions: ['setQrcode', 'setPromotionDefaultAmount'],
|
|
96
|
+
cond: (context, event) => context.siteConfig?.walletMode === '3' && context.promotion?.minimumAmount,
|
|
97
|
+
},
|
|
85
98
|
{
|
|
86
99
|
actions: 'setQrcode',
|
|
87
100
|
},
|
|
88
101
|
],
|
|
89
102
|
SELECT_AMOUNT: [
|
|
103
|
+
{
|
|
104
|
+
target: 'debouncing',
|
|
105
|
+
actions: 'setAmount',
|
|
106
|
+
cond: 'isDoubleWalletMode',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
target: 'pending',
|
|
110
|
+
actions: 'addAmount',
|
|
111
|
+
cond: (context, event) => context.siteConfig?.walletMode === '2' && context.grandTotalEnable === 1,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
target: 'pending',
|
|
115
|
+
actions: 'setAmount',
|
|
116
|
+
cond: 'isFreeWalletMode',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
target: 'debouncing',
|
|
120
|
+
actions: 'addAmount',
|
|
121
|
+
cond: 'isGrandTotalEnable',
|
|
122
|
+
},
|
|
90
123
|
{
|
|
91
124
|
target: 'debouncing',
|
|
92
125
|
actions: 'setAmount',
|
|
93
126
|
},
|
|
94
127
|
],
|
|
95
128
|
KEY_IN: [
|
|
129
|
+
{
|
|
130
|
+
target: 'pending',
|
|
131
|
+
actions: 'setAmount',
|
|
132
|
+
cond: 'isFreeWalletMode',
|
|
133
|
+
},
|
|
96
134
|
{
|
|
97
135
|
target: 'calculating',
|
|
98
136
|
actions: 'setAmount',
|
|
@@ -100,9 +138,51 @@ export default function (request) {
|
|
|
100
138
|
],
|
|
101
139
|
},
|
|
102
140
|
},
|
|
141
|
+
pending: {
|
|
142
|
+
on: {
|
|
143
|
+
SELECT_AMOUNT: [
|
|
144
|
+
{
|
|
145
|
+
actions: 'addAmount',
|
|
146
|
+
cond: 'isGrandTotalEnable',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
actions: 'setAmount',
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
KEY_IN: {
|
|
153
|
+
actions: 'setAmount',
|
|
154
|
+
},
|
|
155
|
+
CONFIRM: {
|
|
156
|
+
target: 'calculating',
|
|
157
|
+
},
|
|
158
|
+
BACK: {
|
|
159
|
+
target: 'loaded',
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
103
163
|
debouncing: {
|
|
104
164
|
on: {
|
|
105
165
|
SELECT_AMOUNT: [
|
|
166
|
+
{
|
|
167
|
+
target: 'debouncing',
|
|
168
|
+
actions: 'setAmount',
|
|
169
|
+
cond: 'isDoubleWalletMode',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
target: 'debouncing',
|
|
173
|
+
actions: 'addAmount',
|
|
174
|
+
cond: (context, event) => context.siteConfig?.walletMode === '2' && context.grandTotalEnable === 1,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
target: 'debouncing',
|
|
178
|
+
actions: 'setAmount',
|
|
179
|
+
cond: 'isFreeWalletMode',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
target: 'debouncing',
|
|
183
|
+
actions: 'addAmount',
|
|
184
|
+
cond: 'isGrandTotalEnable',
|
|
185
|
+
},
|
|
106
186
|
{
|
|
107
187
|
target: 'debouncing',
|
|
108
188
|
actions: 'setAmount',
|
|
@@ -122,6 +202,26 @@ export default function (request) {
|
|
|
122
202
|
entry: 'clearCalculation',
|
|
123
203
|
on: {
|
|
124
204
|
SELECT_AMOUNT: [
|
|
205
|
+
{
|
|
206
|
+
target: 'debouncing',
|
|
207
|
+
actions: 'setAmount',
|
|
208
|
+
cond: 'isDoubleWalletMode',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
target: 'pending',
|
|
212
|
+
actions: 'addAmount',
|
|
213
|
+
cond: (context, event) => context.siteConfig?.walletMode === '2' && context.grandTotalEnable === 1,
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
target: 'pending',
|
|
217
|
+
actions: 'setAmount',
|
|
218
|
+
cond: 'isFreeWalletMode',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
target: 'debouncing',
|
|
222
|
+
actions: 'addAmount',
|
|
223
|
+
cond: 'isGrandTotalEnable',
|
|
224
|
+
},
|
|
125
225
|
{
|
|
126
226
|
target: 'debouncing',
|
|
127
227
|
actions: 'setAmount',
|
|
@@ -140,6 +240,11 @@ export default function (request) {
|
|
|
140
240
|
invoke: {
|
|
141
241
|
src: 'fetchCalculation',
|
|
142
242
|
onDone: [
|
|
243
|
+
{
|
|
244
|
+
target: 'submitting',
|
|
245
|
+
actions: 'setCalculation',
|
|
246
|
+
cond: 'isFreeWalletMode',
|
|
247
|
+
},
|
|
143
248
|
{
|
|
144
249
|
target: 'calculated',
|
|
145
250
|
actions: 'setCalculation',
|
|
@@ -153,6 +258,16 @@ export default function (request) {
|
|
|
153
258
|
calculated: {
|
|
154
259
|
on: {
|
|
155
260
|
SELECT_AMOUNT: [
|
|
261
|
+
{
|
|
262
|
+
target: 'pending',
|
|
263
|
+
actions: 'addAmount',
|
|
264
|
+
cond: (context, event) => context.siteConfig?.walletMode === '2' && context.grandTotalEnable === 1,
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
target: 'pending',
|
|
268
|
+
actions: 'setAmount',
|
|
269
|
+
cond: 'isFreeWalletMode',
|
|
270
|
+
},
|
|
156
271
|
{
|
|
157
272
|
target: 'debouncing',
|
|
158
273
|
actions: 'addAmount',
|
|
@@ -199,8 +314,8 @@ export default function (request) {
|
|
|
199
314
|
actions: 'setQrcode',
|
|
200
315
|
cond: (context, event) => {
|
|
201
316
|
const { siteConfig = {}, promotion = {} } = context
|
|
202
|
-
const { bonusPreviewEnable } = siteConfig
|
|
203
|
-
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
317
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
318
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
204
319
|
},
|
|
205
320
|
},
|
|
206
321
|
{
|
|
@@ -280,8 +395,19 @@ export default function (request) {
|
|
|
280
395
|
promotion,
|
|
281
396
|
}
|
|
282
397
|
}),
|
|
398
|
+
setPromotionDefaultAmount: assign((context, event) => {
|
|
399
|
+
return {
|
|
400
|
+
selectedAmount: context.promotion.minimumAmount,
|
|
401
|
+
}
|
|
402
|
+
}),
|
|
283
403
|
},
|
|
284
404
|
guards: {
|
|
405
|
+
isDoubleWalletMode: (context, event) => {
|
|
406
|
+
return context.siteConfig?.walletMode === '4'
|
|
407
|
+
},
|
|
408
|
+
isFreeWalletMode: (context, event) => {
|
|
409
|
+
return context.siteConfig?.walletMode === '2'
|
|
410
|
+
},
|
|
285
411
|
isGrandTotalEnable: (context, event) => {
|
|
286
412
|
return context.grandTotalEnable === 1
|
|
287
413
|
},
|
|
@@ -45,8 +45,24 @@ export default function (request) {
|
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
47
|
step1: {
|
|
48
|
-
initial: '
|
|
48
|
+
initial: 'promotion',
|
|
49
49
|
states: {
|
|
50
|
+
promotion: {
|
|
51
|
+
always: [
|
|
52
|
+
{
|
|
53
|
+
target: 'idle',
|
|
54
|
+
cond: 'isDoubleWalletMode',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
target: 'calculating',
|
|
58
|
+
actions: 'setPromotionDefaultAmount',
|
|
59
|
+
cond: 'hasMinPromotionDeposit',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
target: 'idle',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
50
66
|
idle: {},
|
|
51
67
|
calculating: {
|
|
52
68
|
invoke: {
|
|
@@ -88,10 +104,11 @@ export default function (request) {
|
|
|
88
104
|
{
|
|
89
105
|
target: 'pending',
|
|
90
106
|
cond: (context, event) => {
|
|
91
|
-
const { calculation, promotion } = context
|
|
107
|
+
const { siteConfig = {}, calculation, promotion } = context
|
|
108
|
+
const { walletMode } = siteConfig
|
|
92
109
|
const { promotionsNo, activityNo } = promotion
|
|
93
110
|
const isNoBonus = promotionsNo === 'none' || activityNo === 'none'
|
|
94
|
-
return !!calculation && !isNoBonus
|
|
111
|
+
return walletMode === '4' && !!calculation && !isNoBonus
|
|
95
112
|
},
|
|
96
113
|
},
|
|
97
114
|
{
|
|
@@ -214,8 +231,16 @@ export default function (request) {
|
|
|
214
231
|
promotion: event.data,
|
|
215
232
|
}
|
|
216
233
|
}),
|
|
234
|
+
setPromotionDefaultAmount: assign((context, event) => {
|
|
235
|
+
return {
|
|
236
|
+
amount: context.promotion.minimumAmount,
|
|
237
|
+
}
|
|
238
|
+
}),
|
|
217
239
|
},
|
|
218
240
|
guards: {
|
|
241
|
+
isDoubleWalletMode: (context, event) => {
|
|
242
|
+
return context.siteConfig?.walletMode === '4'
|
|
243
|
+
},
|
|
219
244
|
isCalculable: (context, event) => {
|
|
220
245
|
const {
|
|
221
246
|
amount,
|
|
@@ -229,6 +254,9 @@ export default function (request) {
|
|
|
229
254
|
isProcessing: (context, event) => {
|
|
230
255
|
return context.processing
|
|
231
256
|
},
|
|
257
|
+
hasMinPromotionDeposit: (context, event) => {
|
|
258
|
+
return context.promotion?.minimumAmount
|
|
259
|
+
},
|
|
232
260
|
},
|
|
233
261
|
services: {
|
|
234
262
|
fetchPaymentDetail: async (context, event) => {
|
|
@@ -74,8 +74,8 @@ export default function (request) {
|
|
|
74
74
|
target: 'fetching',
|
|
75
75
|
cond: (context, event) => {
|
|
76
76
|
const { siteConfig = {}, promotion = {} } = context
|
|
77
|
-
const { bonusPreviewEnable } = siteConfig
|
|
78
|
-
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
77
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
78
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
79
79
|
},
|
|
80
80
|
},
|
|
81
81
|
{ target: 'loaded' },
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -40,9 +40,8 @@ export default function (request) {
|
|
|
40
40
|
gameCode: null,
|
|
41
41
|
name: null,
|
|
42
42
|
},
|
|
43
|
-
|
|
43
|
+
walletMode: null,
|
|
44
44
|
lang: 'en_US',
|
|
45
|
-
site: '',
|
|
46
45
|
isMobile: new UAParser().getResult().device.type,
|
|
47
46
|
gameURL: null,
|
|
48
47
|
gameToken: null,
|
|
@@ -82,11 +81,7 @@ export default function (request) {
|
|
|
82
81
|
},
|
|
83
82
|
ENTER_GAME: {
|
|
84
83
|
target: 'connecting',
|
|
85
|
-
actions: ['setGameInfo', 'setLang', '
|
|
86
|
-
},
|
|
87
|
-
DEMO_GAME: {
|
|
88
|
-
target: 'demoGame',
|
|
89
|
-
actions: ['setGameInfo', 'setLang', 'setSite'],
|
|
84
|
+
actions: ['setGameInfo', 'setLang', 'setWalletMode'],
|
|
90
85
|
},
|
|
91
86
|
MENU_ENTER_GAME: {
|
|
92
87
|
target: 'connecting',
|
|
@@ -177,24 +172,6 @@ export default function (request) {
|
|
|
177
172
|
},
|
|
178
173
|
},
|
|
179
174
|
},
|
|
180
|
-
demoGame: {
|
|
181
|
-
invoke: {
|
|
182
|
-
src: 'demoGame',
|
|
183
|
-
onDone: {
|
|
184
|
-
target: 'playingDemo',
|
|
185
|
-
actions: 'setGameURL',
|
|
186
|
-
},
|
|
187
|
-
onError: {
|
|
188
|
-
target: 'idle',
|
|
189
|
-
actions: 'setGameURL',
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
on: {
|
|
193
|
-
EXIT_GAME: {
|
|
194
|
-
target: 'disconnect',
|
|
195
|
-
},
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
175
|
connectSwitching: {
|
|
199
176
|
invoke: {
|
|
200
177
|
src: 'disconnectGame',
|
|
@@ -228,16 +205,8 @@ export default function (request) {
|
|
|
228
205
|
ENTER_GAME_PAUSE: {
|
|
229
206
|
actions: ['setIsPlaying', 'resetContent', 'resetSHA'],
|
|
230
207
|
},
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
playingDemo: {
|
|
234
|
-
on: {
|
|
235
|
-
EXIT_DEMO_GAME: {
|
|
236
|
-
target: 'idle',
|
|
237
|
-
},
|
|
238
|
-
ENTER_GAME: {
|
|
239
|
-
target: 'connecting',
|
|
240
|
-
actions: ['setGameInfo', 'setLang', 'setwalletType'],
|
|
208
|
+
LEAVE_GAME_REFRESH: {
|
|
209
|
+
actions: 'setIsPlaying',
|
|
241
210
|
},
|
|
242
211
|
},
|
|
243
212
|
},
|
|
@@ -274,6 +243,9 @@ export default function (request) {
|
|
|
274
243
|
},
|
|
275
244
|
},
|
|
276
245
|
on: {
|
|
246
|
+
LEAVE_GAME_REFRESH: {
|
|
247
|
+
actions: 'setIsPlaying',
|
|
248
|
+
},
|
|
277
249
|
LOAD: {
|
|
278
250
|
target: 'routing',
|
|
279
251
|
actions: 'setLoadable',
|
|
@@ -320,11 +292,6 @@ export default function (request) {
|
|
|
320
292
|
},
|
|
321
293
|
},
|
|
322
294
|
},
|
|
323
|
-
on: {
|
|
324
|
-
LEAVE_GAME_REFRESH: {
|
|
325
|
-
actions: 'setIsPlaying',
|
|
326
|
-
},
|
|
327
|
-
},
|
|
328
295
|
},
|
|
329
296
|
{
|
|
330
297
|
actions: {
|
|
@@ -451,17 +418,13 @@ export default function (request) {
|
|
|
451
418
|
const { providerId, gameId, gameTypeId, mappingId, portrait, gameCode, name } = context.switchGame
|
|
452
419
|
return { game: { providerId, gameId, gameTypeId, mappingId, portrait: portrait ? 1 : 0, gameCode, name } }
|
|
453
420
|
}),
|
|
454
|
-
|
|
455
|
-
return {
|
|
421
|
+
setWalletMode: assign((context, event) => {
|
|
422
|
+
return { walletMode: event.data.walletMode }
|
|
456
423
|
}),
|
|
457
424
|
setLang: assign((context, event) => {
|
|
458
425
|
const lang = event.data.locale.replace('-', '_')
|
|
459
426
|
return { lang }
|
|
460
427
|
}),
|
|
461
|
-
setSite: assign((context, event) => {
|
|
462
|
-
const site = event.data.site
|
|
463
|
-
return { site }
|
|
464
|
-
}),
|
|
465
428
|
setPageLoadingDone: assign((context, event) => {
|
|
466
429
|
return {
|
|
467
430
|
pageLoading: true,
|
|
@@ -594,7 +557,7 @@ export default function (request) {
|
|
|
594
557
|
},
|
|
595
558
|
connectGame: async (context, event) => {
|
|
596
559
|
const returnProviders = ['RSG', 'KP', 'EPICWIN', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
|
|
597
|
-
const { lang, isMobile,
|
|
560
|
+
const { lang, isMobile, walletMode } = context
|
|
598
561
|
const { providerId, gameId, gameTypeId, mappingId } = context.game
|
|
599
562
|
const params = {
|
|
600
563
|
provider_id: providerId,
|
|
@@ -604,27 +567,12 @@ export default function (request) {
|
|
|
604
567
|
is_demo: false,
|
|
605
568
|
is_mobile: isMobile === 'mobile' ? 'y' : null,
|
|
606
569
|
lang,
|
|
607
|
-
selected_wallet_type:
|
|
570
|
+
selected_wallet_type: walletMode,
|
|
608
571
|
return_url: returnProviders.includes(providerId) ? `${window.location.origin}${context.base}return` : window.location.href, // For providers to return.
|
|
609
572
|
}
|
|
610
573
|
const { type, redirect_url, gameToken, gameHtml, wallet_type } = await request.send(api.playGame(params))
|
|
611
574
|
return { type, gameToken, gameHtml, gameURL: redirect_url, gameWalletType: wallet_type }
|
|
612
575
|
},
|
|
613
|
-
demoGame: async (context, event) => {
|
|
614
|
-
const { lang, site, isMobile } = context
|
|
615
|
-
const { providerId, gameId, gameTypeId, mappingId } = context.game
|
|
616
|
-
const params = {
|
|
617
|
-
site,
|
|
618
|
-
provider_id: providerId,
|
|
619
|
-
game_id: gameId,
|
|
620
|
-
gametype_id: gameTypeId,
|
|
621
|
-
mapping_id: mappingId,
|
|
622
|
-
is_mobile: isMobile === 'mobile' ? 'y' : null,
|
|
623
|
-
lang,
|
|
624
|
-
}
|
|
625
|
-
const { type, redirect_url, gameToken, gameHtml } = await request.send(api.demoGame(params))
|
|
626
|
-
return { type, gameToken, gameHtml, gameURL: redirect_url }
|
|
627
|
-
},
|
|
628
576
|
disconnectGame: async (context, event) => {
|
|
629
577
|
const uid_site = event.data
|
|
630
578
|
const provider_id = context.game.providerId
|
package/src/machine/index.js
CHANGED
|
@@ -39,7 +39,6 @@ import honor_board from './honor_board.js'
|
|
|
39
39
|
import user_photo from './user_photo.js'
|
|
40
40
|
import navbar from './navbar.js'
|
|
41
41
|
import websocket from './websocket.js'
|
|
42
|
-
import ranking from './ranking.js'
|
|
43
42
|
|
|
44
43
|
export default {
|
|
45
44
|
...activity,
|
|
@@ -83,5 +82,4 @@ export default {
|
|
|
83
82
|
navbar,
|
|
84
83
|
...withdraw,
|
|
85
84
|
websocket,
|
|
86
|
-
ranking,
|
|
87
85
|
}
|
|
@@ -7,6 +7,7 @@ export default function (request) {
|
|
|
7
7
|
id: 'promotions',
|
|
8
8
|
initial: 'loading',
|
|
9
9
|
context: {
|
|
10
|
+
noBonus: {},
|
|
10
11
|
userInfo: {},
|
|
11
12
|
siteConfig: {},
|
|
12
13
|
withdrawRule: {},
|
|
@@ -86,10 +87,10 @@ export default function (request) {
|
|
|
86
87
|
actions: {
|
|
87
88
|
setPromotionsList: assign((context, event) => {
|
|
88
89
|
const promotionsList = JSON.parse(JSON.stringify(event.data))
|
|
89
|
-
const { userInfo, siteConfig } = context
|
|
90
|
+
const { noBonus, userInfo, siteConfig } = context
|
|
90
91
|
const { withdraw_rule, balance, bank_amount } = userInfo
|
|
91
|
-
const { currencyConversionLimit } = siteConfig
|
|
92
|
-
const balanceAvailable = parseFloat(bank_amount) < parseFloat(`${currencyConversionLimit}`)
|
|
92
|
+
const { currencyConversionLimit, walletMode } = siteConfig
|
|
93
|
+
const balanceAvailable = parseFloat(`${walletMode === '4' ? bank_amount : balance}`) < parseFloat(`${currencyConversionLimit}`)
|
|
93
94
|
const isFreeLimitRule = withdraw_rule.includes('FREE_LIMIT')
|
|
94
95
|
const includesDefaultRule = withdraw_rule === 'DEFAULT' || withdraw_rule.includes('FREE_DEFAULT')
|
|
95
96
|
|
|
@@ -111,7 +112,7 @@ export default function (request) {
|
|
|
111
112
|
}
|
|
112
113
|
return {
|
|
113
114
|
promotionsList,
|
|
114
|
-
selectedPromo: promotionsList[0],
|
|
115
|
+
selectedPromo: siteConfig?.walletMode === '4' ? promotionsList[0] : noBonus,
|
|
115
116
|
}
|
|
116
117
|
}),
|
|
117
118
|
setSelectedPromo: assign((context, event) => {
|
package/src/machine/reward.js
CHANGED
|
@@ -16,6 +16,7 @@ export default function (request) {
|
|
|
16
16
|
activityNo: null,
|
|
17
17
|
receiveNo: null,
|
|
18
18
|
withdrawRule: {},
|
|
19
|
+
isPlaying: false,
|
|
19
20
|
callback: () => {},
|
|
20
21
|
},
|
|
21
22
|
states: {
|
|
@@ -46,7 +47,7 @@ export default function (request) {
|
|
|
46
47
|
},
|
|
47
48
|
pending: {
|
|
48
49
|
after: {
|
|
49
|
-
20000: { target: 'loading' },
|
|
50
|
+
20000: [{ target: 'loading', cond: 'isNotInGame' }, { target: 'pending' }],
|
|
50
51
|
},
|
|
51
52
|
},
|
|
52
53
|
},
|
|
@@ -73,6 +74,9 @@ export default function (request) {
|
|
|
73
74
|
target: 'allPointsReceiving',
|
|
74
75
|
actions: 'setCallback',
|
|
75
76
|
},
|
|
77
|
+
SET_IS_PLAYING: {
|
|
78
|
+
actions: 'setIsPlaying',
|
|
79
|
+
},
|
|
76
80
|
},
|
|
77
81
|
},
|
|
78
82
|
fetching: {
|
|
@@ -143,6 +147,11 @@ export default function (request) {
|
|
|
143
147
|
},
|
|
144
148
|
},
|
|
145
149
|
{
|
|
150
|
+
guards: {
|
|
151
|
+
isNotInGame: (context, event) => {
|
|
152
|
+
return !context.isPlaying
|
|
153
|
+
},
|
|
154
|
+
},
|
|
146
155
|
actions: {
|
|
147
156
|
setAuth: assign((context, event) => {
|
|
148
157
|
return { auth: !!event.data }
|
|
@@ -174,6 +183,11 @@ export default function (request) {
|
|
|
174
183
|
withdrawRule: event.data,
|
|
175
184
|
}
|
|
176
185
|
}),
|
|
186
|
+
setIsPlaying: assign((context, event) => {
|
|
187
|
+
return {
|
|
188
|
+
isPlaying: event.data,
|
|
189
|
+
}
|
|
190
|
+
}),
|
|
177
191
|
},
|
|
178
192
|
services: {
|
|
179
193
|
fetchRewardList: async (context, event) => {
|
package/src/machine/setting.js
CHANGED
|
@@ -17,9 +17,6 @@ export default function () {
|
|
|
17
17
|
idle: {},
|
|
18
18
|
},
|
|
19
19
|
on: {
|
|
20
|
-
DEFAULT_SETTING: {
|
|
21
|
-
actions: 'setSetting',
|
|
22
|
-
},
|
|
23
20
|
MODIFY_SETTING: {
|
|
24
21
|
actions: 'saveSetting',
|
|
25
22
|
},
|
|
@@ -32,10 +29,6 @@ export default function () {
|
|
|
32
29
|
const setting = JSON.parse(localStorage.getItem('setting')) || { sound: soundPlay, music: musicPlay }
|
|
33
30
|
return { ...setting }
|
|
34
31
|
}),
|
|
35
|
-
setSetting: assign((context, event) => {
|
|
36
|
-
const { sound, music, locale } = event.data
|
|
37
|
-
return { sound, music, locale }
|
|
38
|
-
}),
|
|
39
32
|
saveSetting: assign((context, event) => {
|
|
40
33
|
const { sound, music, locale } = event.data
|
|
41
34
|
localStorage.setItem('setting', JSON.stringify({ sound, music, locale }))
|
package/src/machine/websocket.js
CHANGED
|
@@ -278,18 +278,6 @@ export default function (request) {
|
|
|
278
278
|
callback({ type: 'PUSH_ANALYTICS', data })
|
|
279
279
|
})
|
|
280
280
|
|
|
281
|
-
// 監聽 activity-reward-info 事件
|
|
282
|
-
clientSocket.on('activity-reward-info', (data) => {
|
|
283
|
-
console.log('[socket][activity-reward-info]:', data)
|
|
284
|
-
callback({ type: 'ACTIVITY_INFO', data })
|
|
285
|
-
})
|
|
286
|
-
|
|
287
|
-
// 監聽 message-notice-info 事件
|
|
288
|
-
clientSocket.on('message-notice-info', (data) => {
|
|
289
|
-
console.log('[socket][message-notice-info]:', data)
|
|
290
|
-
callback({ type: 'ACTIVITY_INFO', data })
|
|
291
|
-
})
|
|
292
|
-
|
|
293
281
|
// 監聽 payment-info 事件
|
|
294
282
|
clientSocket.on('payment-info', (data) => {
|
|
295
283
|
console.log('[socket][payment-info]:', data)
|
|
@@ -147,6 +147,7 @@ export default function (request) {
|
|
|
147
147
|
},
|
|
148
148
|
SET_ATTACHMENT_TYPE: {
|
|
149
149
|
actions: 'setAttachmentType',
|
|
150
|
+
cond: 'isNewWalletMode',
|
|
150
151
|
},
|
|
151
152
|
POOL: {
|
|
152
153
|
target: 'pooling',
|
|
@@ -322,7 +323,7 @@ export default function (request) {
|
|
|
322
323
|
balance,
|
|
323
324
|
siteConfig,
|
|
324
325
|
userInfo,
|
|
325
|
-
attachmentType: 'withdraw',
|
|
326
|
+
attachmentType: siteConfig.walletMode > 0 ? 'withdraw' : null,
|
|
326
327
|
}
|
|
327
328
|
}),
|
|
328
329
|
updateWithdrawCondition: assign((context, event) => {
|
|
@@ -433,6 +434,7 @@ export default function (request) {
|
|
|
433
434
|
isOtpRequired: (context, event) => {
|
|
434
435
|
return event.data?.status === 'otp-verifying'
|
|
435
436
|
},
|
|
437
|
+
isNewWalletMode: (context, event) => context.siteConfig.walletMode > 0,
|
|
436
438
|
},
|
|
437
439
|
services: {
|
|
438
440
|
fetchInitData: async (context, event) => {
|
|
@@ -355,7 +355,7 @@ export default function (request) {
|
|
|
355
355
|
const methods = siteConfig?.paymentMethods?.withdraw || []
|
|
356
356
|
return {
|
|
357
357
|
methods,
|
|
358
|
-
attachmentType: 'withdraw',
|
|
358
|
+
attachmentType: siteConfig.walletMode > 0 ? 'withdraw' : null,
|
|
359
359
|
}
|
|
360
360
|
}),
|
|
361
361
|
setMode: assign((context, event) => {
|
|
@@ -397,8 +397,9 @@ export default function (request) {
|
|
|
397
397
|
return { bindingPaymentList, bindingPaymentInfo, boundBanks: combinedData, currentBank: combinedData[0] }
|
|
398
398
|
}),
|
|
399
399
|
preset: assign((context, event) => {
|
|
400
|
+
const { siteConfig } = context
|
|
400
401
|
return {
|
|
401
|
-
attachmentType: 'withdraw',
|
|
402
|
+
attachmentType: siteConfig.walletMode > 0 ? 'withdraw' : null,
|
|
402
403
|
}
|
|
403
404
|
}),
|
|
404
405
|
setMode: assign((context, event) => {
|
|
@@ -193,6 +193,7 @@ export default function (request) {
|
|
|
193
193
|
},
|
|
194
194
|
SET_ATTACHMENT_TYPE: {
|
|
195
195
|
actions: 'setAttachmentType',
|
|
196
|
+
cond: 'isNewWalletMode',
|
|
196
197
|
},
|
|
197
198
|
SUBMIT: [
|
|
198
199
|
{
|
|
@@ -358,7 +359,7 @@ export default function (request) {
|
|
|
358
359
|
balance,
|
|
359
360
|
siteConfig,
|
|
360
361
|
userInfo,
|
|
361
|
-
attachmentType: 'withdraw',
|
|
362
|
+
attachmentType: siteConfig.walletMode > 0 ? 'withdraw' : null,
|
|
362
363
|
}
|
|
363
364
|
}),
|
|
364
365
|
updateWithdrawCondition: assign((context, event) => {
|
|
@@ -452,6 +453,7 @@ export default function (request) {
|
|
|
452
453
|
isOtpRequired: (context, event) => {
|
|
453
454
|
return event.data?.status === 'otp-verifying'
|
|
454
455
|
},
|
|
456
|
+
isNewWalletMode: (context, event) => context.siteConfig.walletMode > 0,
|
|
455
457
|
isNotWithdrawMinDepositAmount: (context, event) => {
|
|
456
458
|
const { withdrawCheck } = context
|
|
457
459
|
return !withdrawCheck?.passDepositeLimit
|