@jetthai/cuora 1.1.338-dev-1 → 1.1.338-dev-2

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.338-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.338-dev-1...v1.1.338-dev-2) (2025-02-07)
6
+
5
7
  ### [1.1.338-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.338...v1.1.338-dev-1) (2025-02-04)
6
8
 
7
9
  ### [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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.338-dev-1",
3
+ "version": "1.1.338-dev-2",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -40,6 +40,7 @@ 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,
@@ -79,7 +80,7 @@ export default function (request) {
79
80
  },
80
81
  ENTER_GAME: {
81
82
  target: 'connecting',
82
- actions: ['setGameInfo', 'setLang'],
83
+ actions: ['setGameInfo', 'setLang', 'setWalletMode'],
83
84
  },
84
85
  MENU_ENTER_GAME: {
85
86
  target: 'connecting',
@@ -445,6 +446,9 @@ export default function (request) {
445
446
  const { providerId, gameId, gameTypeId, mappingId, portrait, gameCode, name } = context.switchGame
446
447
  return { game: { providerId, gameId, gameTypeId, mappingId, portrait: portrait ? 1 : 0, gameCode, name } }
447
448
  }),
449
+ setWalletMode: assign((context, event) => {
450
+ return { walletMode: event.data.walletMode }
451
+ }),
448
452
  setLang: assign((context, event) => {
449
453
  const lang = event.data.locale.replace('-', '_')
450
454
  return { lang }
@@ -576,7 +580,7 @@ export default function (request) {
576
580
  },
577
581
  connectGame: async (context, event) => {
578
582
  const returnProviders = ['RSG', 'KP', 'EPICWIN', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
579
- const { lang, isMobile } = context
583
+ const { lang, isMobile, walletMode } = context
580
584
  const { providerId, gameId, gameTypeId, mappingId } = context.game
581
585
  const params = {
582
586
  provider_id: providerId,
@@ -586,6 +590,7 @@ export default function (request) {
586
590
  is_demo: false,
587
591
  is_mobile: isMobile === 'mobile' ? 'y' : null,
588
592
  lang,
593
+ selected_wallet_type: walletMode,
589
594
  return_url: returnProviders.includes(providerId) ? `${window.location.origin}${context.base}return` : window.location.href, // For providers to return.
590
595
  }
591
596
  const { type, redirect_url, gameToken, gameHtml } = await request.send(api.playGame(params))