@jetthai/cuora 1.1.430-dev.0 → 1.1.430-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 +2 -0
- package/package.json +1 -1
- package/src/machine/game_v2_1.js +14 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
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.430-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.430-dev.0...v1.1.430-dev.1) (2026-04-30)
|
|
6
|
+
|
|
5
7
|
### [1.1.430-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.431-dev.0...v1.1.430-dev.0) (2026-04-28)
|
|
6
8
|
|
|
7
9
|
|
package/package.json
CHANGED
package/src/machine/game_v2_1.js
CHANGED
|
@@ -53,6 +53,7 @@ export default function (request) {
|
|
|
53
53
|
gameWalletType: null,
|
|
54
54
|
switchGame: null,
|
|
55
55
|
isPlaying: false,
|
|
56
|
+
entry: null,
|
|
56
57
|
},
|
|
57
58
|
states: {
|
|
58
59
|
flow: {
|
|
@@ -85,15 +86,15 @@ export default function (request) {
|
|
|
85
86
|
},
|
|
86
87
|
ENTER_GAME: {
|
|
87
88
|
target: 'connecting',
|
|
88
|
-
actions: ['setGameInfo', 'setLang', 'setWalletType'],
|
|
89
|
+
actions: ['setGameInfo', 'setLang', 'setEntry', 'setWalletType'],
|
|
89
90
|
},
|
|
90
91
|
DEMO_GAME: {
|
|
91
92
|
target: 'demoGame',
|
|
92
|
-
actions: ['setGameInfo', 'setLang', 'setSite'],
|
|
93
|
+
actions: ['setGameInfo', 'setLang', 'setEntry', 'setSite'],
|
|
93
94
|
},
|
|
94
95
|
MENU_ENTER_GAME: {
|
|
95
96
|
target: 'connecting',
|
|
96
|
-
actions: ['setGameInfo', 'setLang', 'setWalletType'],
|
|
97
|
+
actions: ['setGameInfo', 'setLang', 'setEntry', 'setWalletType'],
|
|
97
98
|
},
|
|
98
99
|
UPDATE: {
|
|
99
100
|
target: 'updating',
|
|
@@ -226,14 +227,14 @@ export default function (request) {
|
|
|
226
227
|
},
|
|
227
228
|
MENU_ENTER_GAME: {
|
|
228
229
|
target: 'connectSwitching',
|
|
229
|
-
actions: ['setSwitch', 'setLang', 'setWalletType'],
|
|
230
|
+
actions: ['setSwitch', 'setLang', 'setEntry', 'setWalletType'],
|
|
230
231
|
},
|
|
231
232
|
ENTER_GAME_PAUSE: {
|
|
232
233
|
actions: ['setIsPlaying', 'resetContent', 'resetSHA'],
|
|
233
234
|
},
|
|
234
235
|
ENTER_GAME: {
|
|
235
236
|
target: 'connecting',
|
|
236
|
-
actions: ['setGameInfo', 'setLang', 'setWalletType'],
|
|
237
|
+
actions: ['setGameInfo', 'setLang', 'setEntry', 'setWalletType'],
|
|
237
238
|
},
|
|
238
239
|
},
|
|
239
240
|
},
|
|
@@ -247,7 +248,7 @@ export default function (request) {
|
|
|
247
248
|
},
|
|
248
249
|
ENTER_GAME: {
|
|
249
250
|
target: 'connecting',
|
|
250
|
-
actions: ['setGameInfo', 'setLang', 'setWalletType'],
|
|
251
|
+
actions: ['setGameInfo', 'setLang', 'setEntry', 'setWalletType'],
|
|
251
252
|
},
|
|
252
253
|
},
|
|
253
254
|
},
|
|
@@ -474,6 +475,9 @@ export default function (request) {
|
|
|
474
475
|
const lang = event.data.locale.replace('-', '_')
|
|
475
476
|
return { lang }
|
|
476
477
|
}),
|
|
478
|
+
setEntry: assign((context, event) => {
|
|
479
|
+
return { entry: event?.data?.entrySource }
|
|
480
|
+
}),
|
|
477
481
|
setSite: assign((context, event) => {
|
|
478
482
|
const site = event.data.site
|
|
479
483
|
return { site }
|
|
@@ -646,7 +650,7 @@ export default function (request) {
|
|
|
646
650
|
return
|
|
647
651
|
}
|
|
648
652
|
const returnProviders = ['RSG', 'KP', 'EPICWIN', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
|
|
649
|
-
const { lang, isMobile, walletType } = context
|
|
653
|
+
const { lang, entry, isMobile, walletType } = context
|
|
650
654
|
const { gameTypeId, mappingId } = context.game
|
|
651
655
|
const params = {
|
|
652
656
|
provider_id: providerId,
|
|
@@ -656,6 +660,7 @@ export default function (request) {
|
|
|
656
660
|
is_demo: false,
|
|
657
661
|
is_mobile: isMobile === 'mobile' ? 'y' : null,
|
|
658
662
|
lang,
|
|
663
|
+
entry_source: entry || 'Other',
|
|
659
664
|
selected_wallet_type: walletType || null, // 統一 undefined → null,確保後端收到一致的值
|
|
660
665
|
return_url: returnProviders.includes(providerId)
|
|
661
666
|
? `${window.location.origin}${context.base}return`
|
|
@@ -665,7 +670,7 @@ export default function (request) {
|
|
|
665
670
|
return { type, gameToken, gameHtml, gameURL: redirect_url, gameWalletType: wallet_type }
|
|
666
671
|
},
|
|
667
672
|
demoGame: async (context, event) => {
|
|
668
|
-
const { lang, site, isMobile, game } = context
|
|
673
|
+
const { lang, entry, site, isMobile, game } = context
|
|
669
674
|
const { providerId, gameId, gameTypeId, mappingId } = context.game
|
|
670
675
|
const params = {
|
|
671
676
|
site,
|
|
@@ -675,6 +680,7 @@ export default function (request) {
|
|
|
675
680
|
mapping_id: mappingId,
|
|
676
681
|
is_mobile: isMobile === 'mobile' ? 'y' : null,
|
|
677
682
|
lang,
|
|
683
|
+
entry_source: entry || 'Other',
|
|
678
684
|
appSecret,
|
|
679
685
|
}
|
|
680
686
|
const { type, redirect_url, gameToken, gameHtml, is_demo } = await request.send(api.demoGame(params))
|