@jetthai/cuora 1.1.364-dev-5 → 1.1.364-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 +25 -15
- package/package.json +1 -1
- package/resetGitBranch.sh +49 -0
- package/src/api/activity.js +2 -2
- package/src/api/game.js +14 -1
- package/src/api/payment.js +5 -0
- package/src/api/ranking.js +4 -3
- package/src/machine/activity/activity.js +7 -6
- package/src/machine/activity/vip_card_activity.js +17 -9
- package/src/machine/bank_binding.js +44 -10
- package/src/machine/common.js +3 -1
- package/src/machine/deposit/direct.js +2 -6
- package/src/machine/deposit/float.js +2 -2
- package/src/machine/deposit/loadcard_vn.js +10 -51
- package/src/machine/deposit/manual_vn.js +3 -23
- package/src/machine/deposit/qrcode_v2.js +6 -132
- package/src/machine/deposit/virtual_bank_vn.js +3 -31
- package/src/machine/deposit/vpay.js +2 -2
- package/src/machine/game_betslip.js +46 -0
- package/src/machine/game_search_cash.js +10 -2
- package/src/machine/game_search_v2.js +10 -2
- package/src/machine/game_v2_1.js +81 -12
- package/src/machine/inbox.js +13 -1
- package/src/machine/index.js +2 -0
- package/src/machine/promotions.js +4 -5
- package/src/machine/ranking.js +38 -22
- package/src/machine/reward.js +57 -5
- package/src/machine/reward_cash.js +56 -15
- package/src/machine/setting.js +7 -0
- package/src/machine/withdraw/index.js +0 -12
- package/src/machine/withdraw/withdraw_manual.js +3 -97
- package/src/machine/withdraw/withdraw_manual_cash.js +1 -1
- package/src/machine/withdraw/withdraw_amb.js +0 -373
- package/src/machine/withdraw/withdraw_crypto.js +0 -495
- package/src/machine/withdraw/withdraw_crypto2.js +0 -540
- package/src/machine/withdraw/withdraw_fc.js +0 -251
- package/src/machine/withdraw/withdraw_vn.js +0 -548
- package/src/machine/withdraw/withdraw_vn2.js +0 -563
|
@@ -49,16 +49,8 @@ export default function (request) {
|
|
|
49
49
|
target: 'fetching',
|
|
50
50
|
cond: (context, event) => {
|
|
51
51
|
const { siteConfig = {}, promotion = {}, selectedQrcode } = context
|
|
52
|
-
const {
|
|
53
|
-
return !!selectedQrcode &&
|
|
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
|
|
52
|
+
const { bonusPreviewEnable } = siteConfig
|
|
53
|
+
return !!selectedQrcode && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
62
54
|
},
|
|
63
55
|
},
|
|
64
56
|
{ target: 'loaded' },
|
|
@@ -86,51 +78,21 @@ export default function (request) {
|
|
|
86
78
|
actions: 'setQrcode',
|
|
87
79
|
cond: (context, event) => {
|
|
88
80
|
const { siteConfig = {}, promotion = {} } = context
|
|
89
|
-
const {
|
|
90
|
-
return
|
|
81
|
+
const { bonusPreviewEnable } = siteConfig
|
|
82
|
+
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
91
83
|
},
|
|
92
84
|
},
|
|
93
|
-
{
|
|
94
|
-
target: 'debouncing',
|
|
95
|
-
actions: ['setQrcode', 'setPromotionDefaultAmount'],
|
|
96
|
-
cond: (context, event) => context.siteConfig?.walletMode === '3' && context.promotion?.minimumAmount,
|
|
97
|
-
},
|
|
98
85
|
{
|
|
99
86
|
actions: 'setQrcode',
|
|
100
87
|
},
|
|
101
88
|
],
|
|
102
89
|
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
|
-
},
|
|
123
90
|
{
|
|
124
91
|
target: 'debouncing',
|
|
125
92
|
actions: 'setAmount',
|
|
126
93
|
},
|
|
127
94
|
],
|
|
128
95
|
KEY_IN: [
|
|
129
|
-
{
|
|
130
|
-
target: 'pending',
|
|
131
|
-
actions: 'setAmount',
|
|
132
|
-
cond: 'isFreeWalletMode',
|
|
133
|
-
},
|
|
134
96
|
{
|
|
135
97
|
target: 'calculating',
|
|
136
98
|
actions: 'setAmount',
|
|
@@ -138,51 +100,9 @@ export default function (request) {
|
|
|
138
100
|
],
|
|
139
101
|
},
|
|
140
102
|
},
|
|
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
|
-
},
|
|
163
103
|
debouncing: {
|
|
164
104
|
on: {
|
|
165
105
|
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
|
-
},
|
|
186
106
|
{
|
|
187
107
|
target: 'debouncing',
|
|
188
108
|
actions: 'setAmount',
|
|
@@ -202,26 +122,6 @@ export default function (request) {
|
|
|
202
122
|
entry: 'clearCalculation',
|
|
203
123
|
on: {
|
|
204
124
|
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
|
-
},
|
|
225
125
|
{
|
|
226
126
|
target: 'debouncing',
|
|
227
127
|
actions: 'setAmount',
|
|
@@ -240,11 +140,6 @@ export default function (request) {
|
|
|
240
140
|
invoke: {
|
|
241
141
|
src: 'fetchCalculation',
|
|
242
142
|
onDone: [
|
|
243
|
-
{
|
|
244
|
-
target: 'submitting',
|
|
245
|
-
actions: 'setCalculation',
|
|
246
|
-
cond: 'isFreeWalletMode',
|
|
247
|
-
},
|
|
248
143
|
{
|
|
249
144
|
target: 'calculated',
|
|
250
145
|
actions: 'setCalculation',
|
|
@@ -258,16 +153,6 @@ export default function (request) {
|
|
|
258
153
|
calculated: {
|
|
259
154
|
on: {
|
|
260
155
|
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
|
-
},
|
|
271
156
|
{
|
|
272
157
|
target: 'debouncing',
|
|
273
158
|
actions: 'addAmount',
|
|
@@ -314,8 +199,8 @@ export default function (request) {
|
|
|
314
199
|
actions: 'setQrcode',
|
|
315
200
|
cond: (context, event) => {
|
|
316
201
|
const { siteConfig = {}, promotion = {} } = context
|
|
317
|
-
const {
|
|
318
|
-
return
|
|
202
|
+
const { bonusPreviewEnable } = siteConfig
|
|
203
|
+
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
319
204
|
},
|
|
320
205
|
},
|
|
321
206
|
{
|
|
@@ -395,19 +280,8 @@ export default function (request) {
|
|
|
395
280
|
promotion,
|
|
396
281
|
}
|
|
397
282
|
}),
|
|
398
|
-
setPromotionDefaultAmount: assign((context, event) => {
|
|
399
|
-
return {
|
|
400
|
-
selectedAmount: context.promotion.minimumAmount,
|
|
401
|
-
}
|
|
402
|
-
}),
|
|
403
283
|
},
|
|
404
284
|
guards: {
|
|
405
|
-
isDoubleWalletMode: (context, event) => {
|
|
406
|
-
return context.siteConfig?.walletMode === '4'
|
|
407
|
-
},
|
|
408
|
-
isFreeWalletMode: (context, event) => {
|
|
409
|
-
return context.siteConfig?.walletMode === '2'
|
|
410
|
-
},
|
|
411
285
|
isGrandTotalEnable: (context, event) => {
|
|
412
286
|
return context.grandTotalEnable === 1
|
|
413
287
|
},
|
|
@@ -45,24 +45,8 @@ export default function (request) {
|
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
47
|
step1: {
|
|
48
|
-
initial: '
|
|
48
|
+
initial: 'idle',
|
|
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
|
-
},
|
|
66
50
|
idle: {},
|
|
67
51
|
calculating: {
|
|
68
52
|
invoke: {
|
|
@@ -104,11 +88,10 @@ export default function (request) {
|
|
|
104
88
|
{
|
|
105
89
|
target: 'pending',
|
|
106
90
|
cond: (context, event) => {
|
|
107
|
-
const {
|
|
108
|
-
const { walletMode } = siteConfig
|
|
91
|
+
const { calculation, promotion } = context
|
|
109
92
|
const { promotionsNo, activityNo } = promotion
|
|
110
93
|
const isNoBonus = promotionsNo === 'none' || activityNo === 'none'
|
|
111
|
-
return
|
|
94
|
+
return !!calculation && !isNoBonus
|
|
112
95
|
},
|
|
113
96
|
},
|
|
114
97
|
{
|
|
@@ -231,16 +214,8 @@ export default function (request) {
|
|
|
231
214
|
promotion: event.data,
|
|
232
215
|
}
|
|
233
216
|
}),
|
|
234
|
-
setPromotionDefaultAmount: assign((context, event) => {
|
|
235
|
-
return {
|
|
236
|
-
amount: context.promotion.minimumAmount,
|
|
237
|
-
}
|
|
238
|
-
}),
|
|
239
217
|
},
|
|
240
218
|
guards: {
|
|
241
|
-
isDoubleWalletMode: (context, event) => {
|
|
242
|
-
return context.siteConfig?.walletMode === '4'
|
|
243
|
-
},
|
|
244
219
|
isCalculable: (context, event) => {
|
|
245
220
|
const {
|
|
246
221
|
amount,
|
|
@@ -254,9 +229,6 @@ export default function (request) {
|
|
|
254
229
|
isProcessing: (context, event) => {
|
|
255
230
|
return context.processing
|
|
256
231
|
},
|
|
257
|
-
hasMinPromotionDeposit: (context, event) => {
|
|
258
|
-
return context.promotion?.minimumAmount
|
|
259
|
-
},
|
|
260
232
|
},
|
|
261
233
|
services: {
|
|
262
234
|
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 {
|
|
78
|
-
return
|
|
77
|
+
const { bonusPreviewEnable } = siteConfig
|
|
78
|
+
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
79
79
|
},
|
|
80
80
|
},
|
|
81
81
|
{ target: 'loaded' },
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { assign, createMachine } from 'xstate'
|
|
2
|
+
import game from '../api/game.js'
|
|
3
|
+
|
|
4
|
+
export default function (request, context) {
|
|
5
|
+
const { appSecret } = request.config
|
|
6
|
+
const { providerId, seqNo, lang } = context
|
|
7
|
+
return createMachine(
|
|
8
|
+
{
|
|
9
|
+
id: 'game_betslip',
|
|
10
|
+
initial: 'fetching',
|
|
11
|
+
context: {
|
|
12
|
+
gameBetSlip: {},
|
|
13
|
+
},
|
|
14
|
+
states: {
|
|
15
|
+
fetching: {
|
|
16
|
+
invoke: {
|
|
17
|
+
src: 'fetchBetslip',
|
|
18
|
+
onDone: {
|
|
19
|
+
target: 'idle',
|
|
20
|
+
actions: 'setBetslip',
|
|
21
|
+
},
|
|
22
|
+
onError: {
|
|
23
|
+
target: 'idle',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
idle: {},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
actions: {
|
|
32
|
+
setBetslip: assign((context, event) => {
|
|
33
|
+
return {
|
|
34
|
+
gameBetSlip: event.data,
|
|
35
|
+
}
|
|
36
|
+
}),
|
|
37
|
+
},
|
|
38
|
+
services: {
|
|
39
|
+
// 取得遊戲注單
|
|
40
|
+
fetchBetslip: async (context, event) => {
|
|
41
|
+
return await request.send(game.getBetslip({ providerId, seqNo, lang, appSecret }))
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
}
|
|
@@ -5,7 +5,7 @@ export default function (request) {
|
|
|
5
5
|
return createMachine(
|
|
6
6
|
{
|
|
7
7
|
id: 'game_search_cash',
|
|
8
|
-
initial: '
|
|
8
|
+
initial: 'init',
|
|
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,6 +32,14 @@ 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
|
+
},
|
|
35
43
|
preset: {
|
|
36
44
|
exit: 'setInitialized',
|
|
37
45
|
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: 'init',
|
|
9
9
|
context: {
|
|
10
10
|
keyword: '',
|
|
11
11
|
tagId: null,
|
|
@@ -25,9 +25,17 @@ 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
|
+
},
|
|
31
39
|
preset: {
|
|
32
40
|
invoke: {
|
|
33
41
|
src: 'fetchTags',
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -39,9 +39,11 @@ export default function (request) {
|
|
|
39
39
|
portrait: null,
|
|
40
40
|
gameCode: null,
|
|
41
41
|
name: null,
|
|
42
|
+
isDemo: false,
|
|
42
43
|
},
|
|
43
|
-
|
|
44
|
+
walletType: null,
|
|
44
45
|
lang: 'en_US',
|
|
46
|
+
site: '',
|
|
45
47
|
isMobile: new UAParser().getResult().device.type,
|
|
46
48
|
gameURL: null,
|
|
47
49
|
gameToken: null,
|
|
@@ -81,11 +83,15 @@ export default function (request) {
|
|
|
81
83
|
},
|
|
82
84
|
ENTER_GAME: {
|
|
83
85
|
target: 'connecting',
|
|
84
|
-
actions: ['setGameInfo', 'setLang', '
|
|
86
|
+
actions: ['setGameInfo', 'setLang', 'setWalletType'],
|
|
87
|
+
},
|
|
88
|
+
DEMO_GAME: {
|
|
89
|
+
target: 'demoGame',
|
|
90
|
+
actions: ['setGameInfo', 'setLang', 'setSite'],
|
|
85
91
|
},
|
|
86
92
|
MENU_ENTER_GAME: {
|
|
87
93
|
target: 'connecting',
|
|
88
|
-
actions: ['setGameInfo', 'setLang'],
|
|
94
|
+
actions: ['setGameInfo', 'setLang', 'setWalletType'],
|
|
89
95
|
},
|
|
90
96
|
UPDATE: {
|
|
91
97
|
target: 'updating',
|
|
@@ -172,6 +178,24 @@ export default function (request) {
|
|
|
172
178
|
},
|
|
173
179
|
},
|
|
174
180
|
},
|
|
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
|
+
},
|
|
175
199
|
connectSwitching: {
|
|
176
200
|
invoke: {
|
|
177
201
|
src: 'disconnectGame',
|
|
@@ -205,8 +229,23 @@ export default function (request) {
|
|
|
205
229
|
ENTER_GAME_PAUSE: {
|
|
206
230
|
actions: ['setIsPlaying', 'resetContent', 'resetSHA'],
|
|
207
231
|
},
|
|
208
|
-
|
|
209
|
-
|
|
232
|
+
ENTER_GAME: {
|
|
233
|
+
target: 'connecting',
|
|
234
|
+
actions: ['setGameInfo', 'setLang', 'setwalletType'],
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
playingDemo: {
|
|
239
|
+
on: {
|
|
240
|
+
EXIT_GAME: {
|
|
241
|
+
target: 'disconnect',
|
|
242
|
+
},
|
|
243
|
+
EXIT_DEMO_GAME: {
|
|
244
|
+
target: 'idle',
|
|
245
|
+
},
|
|
246
|
+
ENTER_GAME: {
|
|
247
|
+
target: 'connecting',
|
|
248
|
+
actions: ['setGameInfo', 'setLang', 'setWalletType'],
|
|
210
249
|
},
|
|
211
250
|
},
|
|
212
251
|
},
|
|
@@ -243,13 +282,17 @@ export default function (request) {
|
|
|
243
282
|
},
|
|
244
283
|
},
|
|
245
284
|
on: {
|
|
246
|
-
LEAVE_GAME_REFRESH: {
|
|
247
|
-
actions: 'setIsPlaying',
|
|
248
|
-
},
|
|
249
285
|
LOAD: {
|
|
250
286
|
target: 'routing',
|
|
251
287
|
actions: 'setLoadable',
|
|
252
288
|
},
|
|
289
|
+
SET_ROOM: {
|
|
290
|
+
cond: 'isDifferentRoom',
|
|
291
|
+
actions: ['setRoom', 'resetContent'],
|
|
292
|
+
},
|
|
293
|
+
SET_STATIC_DATA: {
|
|
294
|
+
actions: 'setStaticData',
|
|
295
|
+
},
|
|
253
296
|
},
|
|
254
297
|
},
|
|
255
298
|
},
|
|
@@ -285,6 +328,11 @@ export default function (request) {
|
|
|
285
328
|
},
|
|
286
329
|
},
|
|
287
330
|
},
|
|
331
|
+
on: {
|
|
332
|
+
LEAVE_GAME_REFRESH: {
|
|
333
|
+
actions: 'setIsPlaying',
|
|
334
|
+
},
|
|
335
|
+
},
|
|
288
336
|
},
|
|
289
337
|
{
|
|
290
338
|
actions: {
|
|
@@ -411,13 +459,17 @@ export default function (request) {
|
|
|
411
459
|
const { providerId, gameId, gameTypeId, mappingId, portrait, gameCode, name } = context.switchGame
|
|
412
460
|
return { game: { providerId, gameId, gameTypeId, mappingId, portrait: portrait ? 1 : 0, gameCode, name } }
|
|
413
461
|
}),
|
|
414
|
-
|
|
415
|
-
return {
|
|
462
|
+
setWalletType: assign((context, event) => {
|
|
463
|
+
return { walletType: event.data.walletType }
|
|
416
464
|
}),
|
|
417
465
|
setLang: assign((context, event) => {
|
|
418
466
|
const lang = event.data.locale.replace('-', '_')
|
|
419
467
|
return { lang }
|
|
420
468
|
}),
|
|
469
|
+
setSite: assign((context, event) => {
|
|
470
|
+
const site = event.data.site
|
|
471
|
+
return { site }
|
|
472
|
+
}),
|
|
421
473
|
setPageLoadingDone: assign((context, event) => {
|
|
422
474
|
return {
|
|
423
475
|
pageLoading: true,
|
|
@@ -550,7 +602,7 @@ export default function (request) {
|
|
|
550
602
|
},
|
|
551
603
|
connectGame: async (context, event) => {
|
|
552
604
|
const returnProviders = ['RSG', 'KP', 'EPICWIN', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
|
|
553
|
-
const { lang, isMobile,
|
|
605
|
+
const { lang, isMobile, walletType } = context
|
|
554
606
|
const { providerId, gameId, gameTypeId, mappingId } = context.game
|
|
555
607
|
const params = {
|
|
556
608
|
provider_id: providerId,
|
|
@@ -560,12 +612,29 @@ export default function (request) {
|
|
|
560
612
|
is_demo: false,
|
|
561
613
|
is_mobile: isMobile === 'mobile' ? 'y' : null,
|
|
562
614
|
lang,
|
|
563
|
-
selected_wallet_type:
|
|
615
|
+
selected_wallet_type: walletType,
|
|
564
616
|
return_url: returnProviders.includes(providerId) ? `${window.location.origin}${context.base}return` : window.location.href, // For providers to return.
|
|
565
617
|
}
|
|
566
618
|
const { type, redirect_url, gameToken, gameHtml, wallet_type } = await request.send(api.playGame(params))
|
|
567
619
|
return { type, gameToken, gameHtml, gameURL: redirect_url, gameWalletType: wallet_type }
|
|
568
620
|
},
|
|
621
|
+
demoGame: async (context, event) => {
|
|
622
|
+
const { lang, site, isMobile, game } = context
|
|
623
|
+
const { providerId, gameId, gameTypeId, mappingId } = context.game
|
|
624
|
+
const params = {
|
|
625
|
+
site,
|
|
626
|
+
provider_id: providerId,
|
|
627
|
+
game_id: gameId,
|
|
628
|
+
gametype_id: gameTypeId,
|
|
629
|
+
mapping_id: mappingId,
|
|
630
|
+
is_mobile: isMobile === 'mobile' ? 'y' : null,
|
|
631
|
+
lang,
|
|
632
|
+
}
|
|
633
|
+
const { type, redirect_url, gameToken, gameHtml, is_demo } = await request.send(api.demoGame(params))
|
|
634
|
+
// 將 is_demo 設置到 context.game.isDemo
|
|
635
|
+
game.isDemo = is_demo
|
|
636
|
+
return { type, gameToken, gameHtml, gameURL: redirect_url, game }
|
|
637
|
+
},
|
|
569
638
|
disconnectGame: async (context, event) => {
|
|
570
639
|
const uid_site = event.data
|
|
571
640
|
const provider_id = context.game.providerId
|
package/src/machine/inbox.js
CHANGED
|
@@ -154,6 +154,9 @@ export default function (request) {
|
|
|
154
154
|
LOAD_MESSAGES: {
|
|
155
155
|
target: 'checking',
|
|
156
156
|
},
|
|
157
|
+
RESET_MESSAGES: {
|
|
158
|
+
target: 'reloadMessages',
|
|
159
|
+
},
|
|
157
160
|
},
|
|
158
161
|
},
|
|
159
162
|
inquiring: {
|
|
@@ -244,6 +247,9 @@ export default function (request) {
|
|
|
244
247
|
CLEAR: {
|
|
245
248
|
actions: 'hideMessage',
|
|
246
249
|
},
|
|
250
|
+
SET_LANG: {
|
|
251
|
+
actions: 'setLang',
|
|
252
|
+
},
|
|
247
253
|
},
|
|
248
254
|
},
|
|
249
255
|
{
|
|
@@ -273,6 +279,10 @@ export default function (request) {
|
|
|
273
279
|
},
|
|
274
280
|
},
|
|
275
281
|
actions: {
|
|
282
|
+
setLang: assign((context, event) => {
|
|
283
|
+
const lang = event.data.locale || context.lang || 'en-US'
|
|
284
|
+
return { lang }
|
|
285
|
+
}),
|
|
276
286
|
reset: assign((context, event) => {
|
|
277
287
|
return {
|
|
278
288
|
currentTab: null,
|
|
@@ -282,6 +292,7 @@ export default function (request) {
|
|
|
282
292
|
}
|
|
283
293
|
}),
|
|
284
294
|
resetPage: assign((context, event) => {
|
|
295
|
+
console.log('updateMessage resetPage')
|
|
285
296
|
const { inbox, currentTab } = JSON.parse(JSON.stringify(context))
|
|
286
297
|
inbox[currentTab].page = -1
|
|
287
298
|
return {
|
|
@@ -411,9 +422,10 @@ export default function (request) {
|
|
|
411
422
|
return tabs
|
|
412
423
|
},
|
|
413
424
|
fetchMessages: async (context, event) => {
|
|
425
|
+
const lang = context.lang
|
|
414
426
|
const { isRewardListEnable, currentTab, inbox } = JSON.parse(JSON.stringify(context))
|
|
415
427
|
if (isRewardListEnable && (currentTab === 'REWARD' || currentTab === 'DIAMOND')) {
|
|
416
|
-
const { data } = await request.send(activity.getRewardList({ count: 30, appSecret }))
|
|
428
|
+
const { data } = await request.send(activity.getRewardList({ count: 30, appSecret, lang }))
|
|
417
429
|
inbox[currentTab] = { data, page: 0, totalPage: 1 }
|
|
418
430
|
} else {
|
|
419
431
|
const { page = -1 } = inbox[currentTab] || {}
|
package/src/machine/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import game_search_v2 from './game_search_v2.js'
|
|
|
10
10
|
import game_hot_new from './game_hot_new.js'
|
|
11
11
|
import game_info from './game_info.js'
|
|
12
12
|
import game_replay from './game_replay.js'
|
|
13
|
+
import game_betslip from './game_betslip.js'
|
|
13
14
|
import inbox from './inbox.js'
|
|
14
15
|
import merge from './merge.js'
|
|
15
16
|
import payment_data from './payment_data.js'
|
|
@@ -53,6 +54,7 @@ export default {
|
|
|
53
54
|
game_hot_new,
|
|
54
55
|
game_info,
|
|
55
56
|
game_replay,
|
|
57
|
+
game_betslip,
|
|
56
58
|
inbox,
|
|
57
59
|
merge,
|
|
58
60
|
payment_data,
|
|
@@ -7,7 +7,6 @@ export default function (request) {
|
|
|
7
7
|
id: 'promotions',
|
|
8
8
|
initial: 'loading',
|
|
9
9
|
context: {
|
|
10
|
-
noBonus: {},
|
|
11
10
|
userInfo: {},
|
|
12
11
|
siteConfig: {},
|
|
13
12
|
withdrawRule: {},
|
|
@@ -87,10 +86,10 @@ export default function (request) {
|
|
|
87
86
|
actions: {
|
|
88
87
|
setPromotionsList: assign((context, event) => {
|
|
89
88
|
const promotionsList = JSON.parse(JSON.stringify(event.data))
|
|
90
|
-
const {
|
|
89
|
+
const { userInfo, siteConfig } = context
|
|
91
90
|
const { withdraw_rule, balance, bank_amount } = userInfo
|
|
92
|
-
const { currencyConversionLimit
|
|
93
|
-
const balanceAvailable = parseFloat(
|
|
91
|
+
const { currencyConversionLimit } = siteConfig
|
|
92
|
+
const balanceAvailable = parseFloat(bank_amount) < parseFloat(`${currencyConversionLimit}`)
|
|
94
93
|
const isFreeLimitRule = withdraw_rule.includes('FREE_LIMIT')
|
|
95
94
|
const includesDefaultRule = withdraw_rule === 'DEFAULT' || withdraw_rule.includes('FREE_DEFAULT')
|
|
96
95
|
|
|
@@ -112,7 +111,7 @@ export default function (request) {
|
|
|
112
111
|
}
|
|
113
112
|
return {
|
|
114
113
|
promotionsList,
|
|
115
|
-
selectedPromo:
|
|
114
|
+
selectedPromo: promotionsList[0],
|
|
116
115
|
}
|
|
117
116
|
}),
|
|
118
117
|
setSelectedPromo: assign((context, event) => {
|