@jetthai/cuora 1.1.363 → 1.1.364-dev-5
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 +15 -21
- package/package.json +1 -1
- package/resetGitBranch.sh +0 -49
- package/src/api/activity.js +2 -2
- package/src/api/game.js +1 -2
- package/src/api/payment.js +0 -5
- package/src/api/ranking.js +3 -4
- package/src/machine/activity/activity.js +6 -7
- package/src/machine/activity/vip_card_activity.js +9 -17
- package/src/machine/bank_binding.js +10 -44
- package/src/machine/common.js +1 -3
- 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 +2 -10
- package/src/machine/game_search_v2.js +2 -10
- package/src/machine/game_v2_1.js +12 -77
- package/src/machine/inbox.js +0 -4
- package/src/machine/promotions.js +5 -4
- package/src/machine/ranking.js +22 -38
- package/src/machine/reward.js +2 -44
- package/src/machine/reward_cash.js +15 -44
- package/src/machine/setting.js +0 -7
- 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 +3 -2
- package/src/machine/withdraw/withdraw_manual_cash.js +1 -1
- package/src/machine/withdraw/withdraw_vn.js +3 -1
- package/src/machine/withdraw/withdraw_vn2.js +1 -1
|
@@ -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' },
|
|
@@ -5,7 +5,7 @@ export default function (request) {
|
|
|
5
5
|
return createMachine(
|
|
6
6
|
{
|
|
7
7
|
id: 'game_search_cash',
|
|
8
|
-
initial: '
|
|
8
|
+
initial: 'preset',
|
|
9
9
|
context: {
|
|
10
10
|
initialized: false,
|
|
11
11
|
keyword: '',
|
|
@@ -20,7 +20,7 @@ export default function (request) {
|
|
|
20
20
|
clickDefault: null,
|
|
21
21
|
traceId: null,
|
|
22
22
|
gameCode: null,
|
|
23
|
-
lang: '
|
|
23
|
+
lang: 'en_US',
|
|
24
24
|
|
|
25
25
|
// v2
|
|
26
26
|
recentlySearch: [],
|
|
@@ -32,14 +32,6 @@ export default function (request) {
|
|
|
32
32
|
isRecentlySearch: null,
|
|
33
33
|
},
|
|
34
34
|
states: {
|
|
35
|
-
init: {
|
|
36
|
-
on: {
|
|
37
|
-
INIT: {
|
|
38
|
-
target: 'preset',
|
|
39
|
-
actions: ['setLang'],
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
35
|
preset: {
|
|
44
36
|
exit: 'setInitialized',
|
|
45
37
|
invoke: {
|
|
@@ -5,7 +5,7 @@ export default function (request) {
|
|
|
5
5
|
return createMachine(
|
|
6
6
|
{
|
|
7
7
|
id: 'game_search_v2',
|
|
8
|
-
initial: '
|
|
8
|
+
initial: 'preset',
|
|
9
9
|
context: {
|
|
10
10
|
keyword: '',
|
|
11
11
|
tagId: null,
|
|
@@ -25,17 +25,9 @@ export default function (request) {
|
|
|
25
25
|
isRecentlyGame: null,
|
|
26
26
|
isRecentlySearch: null,
|
|
27
27
|
gameCode: null,
|
|
28
|
-
lang: '
|
|
28
|
+
lang: 'en_US',
|
|
29
29
|
},
|
|
30
30
|
states: {
|
|
31
|
-
init: {
|
|
32
|
-
on: {
|
|
33
|
-
INIT: {
|
|
34
|
-
target: 'preset',
|
|
35
|
-
actions: ['setLang'],
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
31
|
preset: {
|
|
40
32
|
invoke: {
|
|
41
33
|
src: 'fetchTags',
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -39,11 +39,9 @@ export default function (request) {
|
|
|
39
39
|
portrait: null,
|
|
40
40
|
gameCode: null,
|
|
41
41
|
name: null,
|
|
42
|
-
isDemo: false,
|
|
43
42
|
},
|
|
44
|
-
|
|
43
|
+
walletMode: null,
|
|
45
44
|
lang: 'en_US',
|
|
46
|
-
site: '',
|
|
47
45
|
isMobile: new UAParser().getResult().device.type,
|
|
48
46
|
gameURL: null,
|
|
49
47
|
gameToken: null,
|
|
@@ -83,15 +81,11 @@ export default function (request) {
|
|
|
83
81
|
},
|
|
84
82
|
ENTER_GAME: {
|
|
85
83
|
target: 'connecting',
|
|
86
|
-
actions: ['setGameInfo', 'setLang', '
|
|
87
|
-
},
|
|
88
|
-
DEMO_GAME: {
|
|
89
|
-
target: 'demoGame',
|
|
90
|
-
actions: ['setGameInfo', 'setLang', 'setSite'],
|
|
84
|
+
actions: ['setGameInfo', 'setLang', 'setWalletMode'],
|
|
91
85
|
},
|
|
92
86
|
MENU_ENTER_GAME: {
|
|
93
87
|
target: 'connecting',
|
|
94
|
-
actions: ['setGameInfo', 'setLang'
|
|
88
|
+
actions: ['setGameInfo', 'setLang'],
|
|
95
89
|
},
|
|
96
90
|
UPDATE: {
|
|
97
91
|
target: 'updating',
|
|
@@ -178,24 +172,6 @@ export default function (request) {
|
|
|
178
172
|
},
|
|
179
173
|
},
|
|
180
174
|
},
|
|
181
|
-
demoGame: {
|
|
182
|
-
invoke: {
|
|
183
|
-
src: 'demoGame',
|
|
184
|
-
onDone: {
|
|
185
|
-
target: 'playingDemo',
|
|
186
|
-
actions: 'setGameURL',
|
|
187
|
-
},
|
|
188
|
-
onError: {
|
|
189
|
-
target: 'idle',
|
|
190
|
-
actions: 'setGameURL',
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
on: {
|
|
194
|
-
EXIT_GAME: {
|
|
195
|
-
target: 'disconnect',
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
175
|
connectSwitching: {
|
|
200
176
|
invoke: {
|
|
201
177
|
src: 'disconnectGame',
|
|
@@ -229,19 +205,8 @@ export default function (request) {
|
|
|
229
205
|
ENTER_GAME_PAUSE: {
|
|
230
206
|
actions: ['setIsPlaying', 'resetContent', 'resetSHA'],
|
|
231
207
|
},
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
playingDemo: {
|
|
235
|
-
on: {
|
|
236
|
-
EXIT_GAME: {
|
|
237
|
-
target: 'disconnect',
|
|
238
|
-
},
|
|
239
|
-
EXIT_DEMO_GAME: {
|
|
240
|
-
target: 'idle',
|
|
241
|
-
},
|
|
242
|
-
ENTER_GAME: {
|
|
243
|
-
target: 'connecting',
|
|
244
|
-
actions: ['setGameInfo', 'setLang', 'setWalletType'],
|
|
208
|
+
LEAVE_GAME_REFRESH: {
|
|
209
|
+
actions: 'setIsPlaying',
|
|
245
210
|
},
|
|
246
211
|
},
|
|
247
212
|
},
|
|
@@ -278,17 +243,13 @@ export default function (request) {
|
|
|
278
243
|
},
|
|
279
244
|
},
|
|
280
245
|
on: {
|
|
246
|
+
LEAVE_GAME_REFRESH: {
|
|
247
|
+
actions: 'setIsPlaying',
|
|
248
|
+
},
|
|
281
249
|
LOAD: {
|
|
282
250
|
target: 'routing',
|
|
283
251
|
actions: 'setLoadable',
|
|
284
252
|
},
|
|
285
|
-
SET_ROOM: {
|
|
286
|
-
cond: 'isDifferentRoom',
|
|
287
|
-
actions: ['setRoom', 'resetContent'],
|
|
288
|
-
},
|
|
289
|
-
SET_STATIC_DATA: {
|
|
290
|
-
actions: 'setStaticData',
|
|
291
|
-
},
|
|
292
253
|
},
|
|
293
254
|
},
|
|
294
255
|
},
|
|
@@ -324,11 +285,6 @@ export default function (request) {
|
|
|
324
285
|
},
|
|
325
286
|
},
|
|
326
287
|
},
|
|
327
|
-
on: {
|
|
328
|
-
LEAVE_GAME_REFRESH: {
|
|
329
|
-
actions: 'setIsPlaying',
|
|
330
|
-
},
|
|
331
|
-
},
|
|
332
288
|
},
|
|
333
289
|
{
|
|
334
290
|
actions: {
|
|
@@ -455,17 +411,13 @@ export default function (request) {
|
|
|
455
411
|
const { providerId, gameId, gameTypeId, mappingId, portrait, gameCode, name } = context.switchGame
|
|
456
412
|
return { game: { providerId, gameId, gameTypeId, mappingId, portrait: portrait ? 1 : 0, gameCode, name } }
|
|
457
413
|
}),
|
|
458
|
-
|
|
459
|
-
return {
|
|
414
|
+
setWalletMode: assign((context, event) => {
|
|
415
|
+
return { walletMode: event.data.walletMode }
|
|
460
416
|
}),
|
|
461
417
|
setLang: assign((context, event) => {
|
|
462
418
|
const lang = event.data.locale.replace('-', '_')
|
|
463
419
|
return { lang }
|
|
464
420
|
}),
|
|
465
|
-
setSite: assign((context, event) => {
|
|
466
|
-
const site = event.data.site
|
|
467
|
-
return { site }
|
|
468
|
-
}),
|
|
469
421
|
setPageLoadingDone: assign((context, event) => {
|
|
470
422
|
return {
|
|
471
423
|
pageLoading: true,
|
|
@@ -598,7 +550,7 @@ export default function (request) {
|
|
|
598
550
|
},
|
|
599
551
|
connectGame: async (context, event) => {
|
|
600
552
|
const returnProviders = ['RSG', 'KP', 'EPICWIN', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
|
|
601
|
-
const { lang, isMobile,
|
|
553
|
+
const { lang, isMobile, walletMode } = context
|
|
602
554
|
const { providerId, gameId, gameTypeId, mappingId } = context.game
|
|
603
555
|
const params = {
|
|
604
556
|
provider_id: providerId,
|
|
@@ -608,29 +560,12 @@ export default function (request) {
|
|
|
608
560
|
is_demo: false,
|
|
609
561
|
is_mobile: isMobile === 'mobile' ? 'y' : null,
|
|
610
562
|
lang,
|
|
611
|
-
selected_wallet_type:
|
|
563
|
+
selected_wallet_type: walletMode,
|
|
612
564
|
return_url: returnProviders.includes(providerId) ? `${window.location.origin}${context.base}return` : window.location.href, // For providers to return.
|
|
613
565
|
}
|
|
614
566
|
const { type, redirect_url, gameToken, gameHtml, wallet_type } = await request.send(api.playGame(params))
|
|
615
567
|
return { type, gameToken, gameHtml, gameURL: redirect_url, gameWalletType: wallet_type }
|
|
616
568
|
},
|
|
617
|
-
demoGame: async (context, event) => {
|
|
618
|
-
const { lang, site, isMobile, game } = context
|
|
619
|
-
const { providerId, gameId, gameTypeId, mappingId } = context.game
|
|
620
|
-
const params = {
|
|
621
|
-
site,
|
|
622
|
-
provider_id: providerId,
|
|
623
|
-
game_id: gameId,
|
|
624
|
-
gametype_id: gameTypeId,
|
|
625
|
-
mapping_id: mappingId,
|
|
626
|
-
is_mobile: isMobile === 'mobile' ? 'y' : null,
|
|
627
|
-
lang,
|
|
628
|
-
}
|
|
629
|
-
const { type, redirect_url, gameToken, gameHtml, is_demo } = await request.send(api.demoGame(params))
|
|
630
|
-
// 將 is_demo 設置到 context.game.isDemo
|
|
631
|
-
game.isDemo = is_demo
|
|
632
|
-
return { type, gameToken, gameHtml, gameURL: redirect_url, game }
|
|
633
|
-
},
|
|
634
569
|
disconnectGame: async (context, event) => {
|
|
635
570
|
const uid_site = event.data
|
|
636
571
|
const provider_id = context.game.providerId
|
package/src/machine/inbox.js
CHANGED
|
@@ -154,9 +154,6 @@ export default function (request) {
|
|
|
154
154
|
LOAD_MESSAGES: {
|
|
155
155
|
target: 'checking',
|
|
156
156
|
},
|
|
157
|
-
RESET_MESSAGES: {
|
|
158
|
-
target: 'reloadMessages',
|
|
159
|
-
},
|
|
160
157
|
},
|
|
161
158
|
},
|
|
162
159
|
inquiring: {
|
|
@@ -285,7 +282,6 @@ export default function (request) {
|
|
|
285
282
|
}
|
|
286
283
|
}),
|
|
287
284
|
resetPage: assign((context, event) => {
|
|
288
|
-
console.log('updateMessage resetPage')
|
|
289
285
|
const { inbox, currentTab } = JSON.parse(JSON.stringify(context))
|
|
290
286
|
inbox[currentTab].page = -1
|
|
291
287
|
return {
|
|
@@ -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) => {
|