@jetthai/cuora 1.1.338-dev-1 → 1.1.338-dev-3
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 +4 -0
- package/package.json +1 -1
- package/src/machine/game_v2_1.js +13 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
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.338-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.338-dev-2...v1.1.338-dev-3) (2025-02-11)
|
|
6
|
+
|
|
7
|
+
### [1.1.338-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.338-dev-1...v1.1.338-dev-2) (2025-02-07)
|
|
8
|
+
|
|
5
9
|
### [1.1.338-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.338...v1.1.338-dev-1) (2025-02-04)
|
|
6
10
|
|
|
7
11
|
### [1.1.336-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.337...v1.1.336-dev-10) (2025-02-04)
|
package/package.json
CHANGED
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
|
...oldContext,
|
|
50
52
|
},
|
|
@@ -79,7 +81,7 @@ export default function (request) {
|
|
|
79
81
|
},
|
|
80
82
|
ENTER_GAME: {
|
|
81
83
|
target: 'connecting',
|
|
82
|
-
actions: ['setGameInfo', 'setLang'],
|
|
84
|
+
actions: ['setGameInfo', 'setLang', 'setWalletMode'],
|
|
83
85
|
},
|
|
84
86
|
MENU_ENTER_GAME: {
|
|
85
87
|
target: 'connecting',
|
|
@@ -430,6 +432,9 @@ export default function (request) {
|
|
|
430
432
|
gameURL: (context, event) => {
|
|
431
433
|
return event.data.gameURL
|
|
432
434
|
},
|
|
435
|
+
gameWalletType: (context, event) => {
|
|
436
|
+
return event.data.gameWalletType
|
|
437
|
+
},
|
|
433
438
|
}),
|
|
434
439
|
clearGameInfo: assign((context, event) => {
|
|
435
440
|
return { game: { providerId: null, gameId: null, gameTypeId: null, mappingId: null } }
|
|
@@ -445,6 +450,9 @@ export default function (request) {
|
|
|
445
450
|
const { providerId, gameId, gameTypeId, mappingId, portrait, gameCode, name } = context.switchGame
|
|
446
451
|
return { game: { providerId, gameId, gameTypeId, mappingId, portrait: portrait ? 1 : 0, gameCode, name } }
|
|
447
452
|
}),
|
|
453
|
+
setWalletMode: assign((context, event) => {
|
|
454
|
+
return { walletMode: event.data.walletMode }
|
|
455
|
+
}),
|
|
448
456
|
setLang: assign((context, event) => {
|
|
449
457
|
const lang = event.data.locale.replace('-', '_')
|
|
450
458
|
return { lang }
|
|
@@ -576,7 +584,7 @@ export default function (request) {
|
|
|
576
584
|
},
|
|
577
585
|
connectGame: async (context, event) => {
|
|
578
586
|
const returnProviders = ['RSG', 'KP', 'EPICWIN', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
|
|
579
|
-
const { lang, isMobile } = context
|
|
587
|
+
const { lang, isMobile, walletMode } = context
|
|
580
588
|
const { providerId, gameId, gameTypeId, mappingId } = context.game
|
|
581
589
|
const params = {
|
|
582
590
|
provider_id: providerId,
|
|
@@ -586,10 +594,11 @@ export default function (request) {
|
|
|
586
594
|
is_demo: false,
|
|
587
595
|
is_mobile: isMobile === 'mobile' ? 'y' : null,
|
|
588
596
|
lang,
|
|
597
|
+
selected_wallet_type: walletMode,
|
|
589
598
|
return_url: returnProviders.includes(providerId) ? `${window.location.origin}${context.base}return` : window.location.href, // For providers to return.
|
|
590
599
|
}
|
|
591
|
-
const { type, redirect_url, gameToken, gameHtml } = await request.send(api.playGame(params))
|
|
592
|
-
return { type, gameToken, gameHtml, gameURL: redirect_url }
|
|
600
|
+
const { type, redirect_url, gameToken, gameHtml, wallet_type } = await request.send(api.playGame(params))
|
|
601
|
+
return { type, gameToken, gameHtml, gameURL: redirect_url, gameWalletType: wallet_type }
|
|
593
602
|
},
|
|
594
603
|
disconnectGame: async (context, event) => {
|
|
595
604
|
const uid_site = event.data
|