@jetthai/cuora 1.1.341 → 1.1.342

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 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.342](https://github.com/jetthai/cuora-module/compare/v1.1.341...v1.1.342) (2025-03-10)
6
+
5
7
  ### [1.1.341](https://github.com/jetthai/cuora-module/compare/v1.1.340...v1.1.341) (2025-02-25)
6
8
 
7
9
  ### [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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.341",
3
+ "version": "1.1.342",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -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