@jetthai/cuora 1.1.81 → 1.1.82

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.82](https://github.com/jetthai/cuora-module/compare/v1.1.81...v1.1.82) (2023-04-24)
6
+
5
7
  ### [1.1.81](https://github.com/jetthai/cuora-module/compare/v1.1.80...v1.1.81) (2023-04-20)
6
8
 
7
9
  ### [1.1.80](https://github.com/jetthai/cuora-module/compare/v1.1.79...v1.1.80) (2023-04-18)
package/dist/bundle.mjs CHANGED
@@ -18114,6 +18114,7 @@ function game_v2_1 (request) {
18114
18114
  }
18115
18115
  },
18116
18116
  connectGame: async (context, event) => {
18117
+ const returnProviders = ['RSG', 'KP', 'EPICWIN', 'KA', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG'];
18117
18118
  const { lang, isMobile } = context;
18118
18119
  const { providerId, gameId, gameTypeId, mappingId } = context.game;
18119
18120
  const params = {
@@ -18124,7 +18125,7 @@ function game_v2_1 (request) {
18124
18125
  is_demo: false,
18125
18126
  is_mobile: isMobile,
18126
18127
  lang,
18127
- return_url: window.location.href,
18128
+ return_url: returnProviders.includes(providerId) ? `${window.location.origin}/return` : window.location.href, // For providers to return.
18128
18129
  };
18129
18130
  const { redirect_url } = await request.send(game$1.playGame(params));
18130
18131
  return { gameURL: redirect_url }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.81",
3
+ "version": "1.1.82",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -368,6 +368,7 @@ export default function (request) {
368
368
  }
369
369
  },
370
370
  connectGame: async (context, event) => {
371
+ const returnProviders = ['RSG', 'KP', 'EPICWIN', 'KA', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
371
372
  const { lang, isMobile } = context
372
373
  const { providerId, gameId, gameTypeId, mappingId } = context.game
373
374
  const params = {
@@ -378,7 +379,7 @@ export default function (request) {
378
379
  is_demo: false,
379
380
  is_mobile: isMobile,
380
381
  lang,
381
- return_url: window.location.href,
382
+ return_url: returnProviders.includes(providerId) ? `${window.location.origin}/return` : window.location.href, // For providers to return.
382
383
  }
383
384
  const { redirect_url } = await request.send(api.playGame(params))
384
385
  return { gameURL: redirect_url }