@jetthai/cuora 1.1.341 → 1.1.343-depositEvent-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 +6 -0
- package/package.json +1 -1
- package/src/machine/auth.js +2 -2
- package/src/machine/common.js +1 -1
- package/src/machine/deposit/crypto_button.js +2 -2
- package/src/machine/deposit/float.js +2 -2
- package/src/machine/deposit/loadcard_vn.js +6 -6
- package/src/machine/deposit/qrcode_v2.js +6 -6
- package/src/machine/deposit/vpay.js +2 -2
- package/src/machine/game_v2_1.js +13 -4
- package/src/machine/websocket.js +18 -14
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
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.343-depositEvent-1](https://github.com/jetthai/cuora-module/compare/v1.1.343...v1.1.343-depositEvent-1) (2025-03-14)
|
|
6
|
+
|
|
7
|
+
### [1.1.343](https://github.com/jetthai/cuora-module/compare/v1.1.342...v1.1.343) (2025-03-11)
|
|
8
|
+
|
|
9
|
+
### [1.1.342](https://github.com/jetthai/cuora-module/compare/v1.1.341...v1.1.342) (2025-03-10)
|
|
10
|
+
|
|
5
11
|
### [1.1.341](https://github.com/jetthai/cuora-module/compare/v1.1.340...v1.1.341) (2025-02-25)
|
|
6
12
|
|
|
7
13
|
### [1.1.338-perf-1](https://github.com/jetthai/cuora-module/compare/v1.1.338...v1.1.338-perf-1) (2025-02-12)
|
package/package.json
CHANGED
package/src/machine/auth.js
CHANGED
|
@@ -430,7 +430,7 @@ export default function (request) {
|
|
|
430
430
|
}),
|
|
431
431
|
redirectTo3Party: async (context, event) => {
|
|
432
432
|
const { provider, channel, subchannel, fc } = event.data
|
|
433
|
-
const deviceTokenEnable = context.siteConfig?.dtVerify
|
|
433
|
+
const deviceTokenEnable = context.siteConfig?.dtVerify
|
|
434
434
|
|
|
435
435
|
const dt = await getDeviceToken({
|
|
436
436
|
fpToken,
|
|
@@ -513,7 +513,7 @@ export default function (request) {
|
|
|
513
513
|
return await request.send(user.getUserInfo())
|
|
514
514
|
},
|
|
515
515
|
checkDeviceToken: async (context, event) => {
|
|
516
|
-
const deviceTokenEnable = context.siteConfig?.dtVerify
|
|
516
|
+
const deviceTokenEnable = context.siteConfig?.dtVerify
|
|
517
517
|
if (deviceTokenEnable) {
|
|
518
518
|
const { exist } = await request.send(user.checkDt())
|
|
519
519
|
if (!exist) {
|
package/src/machine/common.js
CHANGED
|
@@ -55,8 +55,8 @@ export default function (request) {
|
|
|
55
55
|
target: 'fetching',
|
|
56
56
|
cond: (context, event) => {
|
|
57
57
|
const { siteConfig = {}, promotion = {}, selectedCrypto } = context
|
|
58
|
-
const { walletMode = '', bonusPreviewEnable
|
|
59
|
-
return !!selectedCrypto && walletMode === '4' && bonusPreviewEnable
|
|
58
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
59
|
+
return !!selectedCrypto && walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
60
60
|
},
|
|
61
61
|
},
|
|
62
62
|
{ target: 'loaded' },
|
|
@@ -72,8 +72,8 @@ export default function (request) {
|
|
|
72
72
|
target: 'fetching',
|
|
73
73
|
cond: (context, event) => {
|
|
74
74
|
const { siteConfig = {}, promotion = {} } = context
|
|
75
|
-
const { walletMode = '', bonusPreviewEnable
|
|
76
|
-
return walletMode === '4' && bonusPreviewEnable
|
|
75
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
76
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
79
|
{ target: 'loaded' },
|
|
@@ -49,8 +49,8 @@ export default function (request) {
|
|
|
49
49
|
target: 'fetching',
|
|
50
50
|
cond: (context, event) => {
|
|
51
51
|
const { siteConfig = {}, promotion = {}, selectedCard } = context
|
|
52
|
-
const { walletMode = '', bonusPreviewEnable
|
|
53
|
-
return !!selectedCard && walletMode === '4' && bonusPreviewEnable
|
|
52
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
53
|
+
return !!selectedCard && walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
{ target: 'loaded' },
|
|
@@ -78,8 +78,8 @@ export default function (request) {
|
|
|
78
78
|
actions: 'setCard',
|
|
79
79
|
cond: (context, event) => {
|
|
80
80
|
const { siteConfig = {}, promotion = {} } = context
|
|
81
|
-
const { walletMode = '', bonusPreviewEnable
|
|
82
|
-
return walletMode === '4' && bonusPreviewEnable
|
|
81
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
82
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
83
83
|
},
|
|
84
84
|
},
|
|
85
85
|
{
|
|
@@ -216,8 +216,8 @@ export default function (request) {
|
|
|
216
216
|
actions: 'setCard',
|
|
217
217
|
cond: (context, event) => {
|
|
218
218
|
const { siteConfig = {}, promotion = {} } = context
|
|
219
|
-
const { walletMode = '', bonusPreviewEnable
|
|
220
|
-
return walletMode === '4' && bonusPreviewEnable
|
|
219
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
220
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
221
221
|
},
|
|
222
222
|
},
|
|
223
223
|
{
|
|
@@ -49,8 +49,8 @@ export default function (request) {
|
|
|
49
49
|
target: 'fetching',
|
|
50
50
|
cond: (context, event) => {
|
|
51
51
|
const { siteConfig = {}, promotion = {}, selectedQrcode } = context
|
|
52
|
-
const { walletMode = '', bonusPreviewEnable
|
|
53
|
-
return !!selectedQrcode && walletMode === '4' && bonusPreviewEnable
|
|
52
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
53
|
+
return !!selectedQrcode && walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
{
|
|
@@ -86,8 +86,8 @@ export default function (request) {
|
|
|
86
86
|
actions: 'setQrcode',
|
|
87
87
|
cond: (context, event) => {
|
|
88
88
|
const { siteConfig = {}, promotion = {} } = context
|
|
89
|
-
const { walletMode = '', bonusPreviewEnable
|
|
90
|
-
return walletMode === '4' && bonusPreviewEnable
|
|
89
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
90
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
91
91
|
},
|
|
92
92
|
},
|
|
93
93
|
{
|
|
@@ -314,8 +314,8 @@ export default function (request) {
|
|
|
314
314
|
actions: 'setQrcode',
|
|
315
315
|
cond: (context, event) => {
|
|
316
316
|
const { siteConfig = {}, promotion = {} } = context
|
|
317
|
-
const { walletMode = '', bonusPreviewEnable
|
|
318
|
-
return walletMode === '4' && bonusPreviewEnable
|
|
317
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
318
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
319
319
|
},
|
|
320
320
|
},
|
|
321
321
|
{
|
|
@@ -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 { walletMode = '', bonusPreviewEnable
|
|
78
|
-
return walletMode === '4' && bonusPreviewEnable
|
|
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,11 +40,13 @@ export default function (request) {
|
|
|
40
40
|
gameCode: null,
|
|
41
41
|
name: null,
|
|
42
42
|
},
|
|
43
|
+
walletMode: null,
|
|
43
44
|
lang: 'en_US',
|
|
44
45
|
isMobile: new UAParser().getResult().device.type,
|
|
45
46
|
gameURL: null,
|
|
46
47
|
gameToken: null,
|
|
47
48
|
gameHtml: null,
|
|
49
|
+
gameWalletType: null,
|
|
48
50
|
switchGame: null,
|
|
49
51
|
isPlaying: false,
|
|
50
52
|
...oldContext,
|
|
@@ -80,7 +82,7 @@ export default function (request) {
|
|
|
80
82
|
},
|
|
81
83
|
ENTER_GAME: {
|
|
82
84
|
target: 'connecting',
|
|
83
|
-
actions: ['setGameInfo', 'setLang'],
|
|
85
|
+
actions: ['setGameInfo', 'setLang', 'setWalletMode'],
|
|
84
86
|
},
|
|
85
87
|
MENU_ENTER_GAME: {
|
|
86
88
|
target: 'connecting',
|
|
@@ -449,6 +451,9 @@ export default function (request) {
|
|
|
449
451
|
gameURL: (context, event) => {
|
|
450
452
|
return event.data.gameURL
|
|
451
453
|
},
|
|
454
|
+
gameWalletType: (context, event) => {
|
|
455
|
+
return event.data.gameWalletType
|
|
456
|
+
},
|
|
452
457
|
}),
|
|
453
458
|
clearGameInfo: assign((context, event) => {
|
|
454
459
|
return { game: { providerId: null, gameId: null, gameTypeId: null, mappingId: null } }
|
|
@@ -464,6 +469,9 @@ export default function (request) {
|
|
|
464
469
|
const { providerId, gameId, gameTypeId, mappingId, portrait, gameCode, name } = context.switchGame
|
|
465
470
|
return { game: { providerId, gameId, gameTypeId, mappingId, portrait: portrait ? 1 : 0, gameCode, name } }
|
|
466
471
|
}),
|
|
472
|
+
setWalletMode: assign((context, event) => {
|
|
473
|
+
return { walletMode: event.data.walletMode }
|
|
474
|
+
}),
|
|
467
475
|
setLang: assign((context, event) => {
|
|
468
476
|
const lang = event.data.locale.replace('-', '_')
|
|
469
477
|
return { lang }
|
|
@@ -605,7 +613,7 @@ export default function (request) {
|
|
|
605
613
|
},
|
|
606
614
|
connectGame: async (context, event) => {
|
|
607
615
|
const returnProviders = ['RSG', 'KP', 'EPICWIN', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
|
|
608
|
-
const { lang, isMobile } = context
|
|
616
|
+
const { lang, isMobile, walletMode } = context
|
|
609
617
|
const { providerId, gameId, gameTypeId, mappingId } = context.game
|
|
610
618
|
const params = {
|
|
611
619
|
provider_id: providerId,
|
|
@@ -615,10 +623,11 @@ export default function (request) {
|
|
|
615
623
|
is_demo: false,
|
|
616
624
|
is_mobile: isMobile === 'mobile' ? 'y' : null,
|
|
617
625
|
lang,
|
|
626
|
+
selected_wallet_type: walletMode,
|
|
618
627
|
return_url: returnProviders.includes(providerId) ? `${window.location.origin}${context.base}return` : window.location.href, // For providers to return.
|
|
619
628
|
}
|
|
620
|
-
const { type, redirect_url, gameToken, gameHtml } = await request.send(api.playGame(params))
|
|
621
|
-
return { type, gameToken, gameHtml, gameURL: redirect_url }
|
|
629
|
+
const { type, redirect_url, gameToken, gameHtml, wallet_type } = await request.send(api.playGame(params))
|
|
630
|
+
return { type, gameToken, gameHtml, gameURL: redirect_url, gameWalletType: wallet_type }
|
|
622
631
|
},
|
|
623
632
|
disconnectGame: async (context, event) => {
|
|
624
633
|
const uid_site = event.data
|
package/src/machine/websocket.js
CHANGED
|
@@ -176,19 +176,22 @@ export default function (request) {
|
|
|
176
176
|
}),
|
|
177
177
|
pushEvent: assign((context, value) => {
|
|
178
178
|
const { analytics } = context
|
|
179
|
-
const { data, event } = value.data
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
179
|
+
const { data, event, isTracking } = value.data
|
|
180
|
+
if (isTracking) {
|
|
181
|
+
analytics?.push(
|
|
182
|
+
{
|
|
183
|
+
event: event,
|
|
184
|
+
paymentMethod: data.paymentMethod,
|
|
185
|
+
transaction_id: data.transactionId,
|
|
186
|
+
currency: data.currency,
|
|
187
|
+
value: data.value,
|
|
188
|
+
app_value: data.value,
|
|
189
|
+
},
|
|
190
|
+
{ eventID: data.transactionId }
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (event === 'purchase' && data?.isFirst === true && isTracking) {
|
|
192
195
|
analytics?.push(
|
|
193
196
|
{
|
|
194
197
|
event: 'first_deposit',
|
|
@@ -271,11 +274,12 @@ export default function (request) {
|
|
|
271
274
|
clientSocket.on('activity-info', (data) => {
|
|
272
275
|
console.log('[socket][activity-info]:', data)
|
|
273
276
|
callback({ type: 'ACTIVITY_INFO', data })
|
|
277
|
+
callback({ type: 'PUSH_ANALYTICS', data })
|
|
274
278
|
})
|
|
275
279
|
|
|
276
280
|
// 監聽 payment-info 事件
|
|
277
281
|
clientSocket.on('payment-info', (data) => {
|
|
278
|
-
console.log('[socket][payment-info]:', data
|
|
282
|
+
console.log('[socket][payment-info]:', data)
|
|
279
283
|
if (data.windowType === 'toast') {
|
|
280
284
|
callback({ type: 'ACTIVITY_INFO', data })
|
|
281
285
|
}
|