@jetthai/cuora 1.1.88 → 1.1.90-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 CHANGED
@@ -2,6 +2,12 @@
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.90-1](https://github.com/jetthai/cuora-module/compare/v1.1.90...v1.1.90-1) (2023-05-09)
6
+
7
+ ### [1.1.90](https://github.com/jetthai/cuora-module/compare/v1.1.89...v1.1.90) (2023-05-02)
8
+
9
+ ### [1.1.89](https://github.com/jetthai/cuora-module/compare/v1.1.88...v1.1.89) (2023-05-02)
10
+
5
11
  ### [1.1.88](https://github.com/jetthai/cuora-module/compare/v1.1.74-1...v1.1.88) (2023-05-02)
6
12
 
7
13
  ### [1.1.66-1](https://github.com/jetthai/cuora-module/compare/v1.1.77...v1.1.66-1) (2023-04-13)
package/dist/bundle.mjs CHANGED
@@ -17832,6 +17832,7 @@ function game_v2_1 (request) {
17832
17832
  id: 'game',
17833
17833
  type: 'parallel',
17834
17834
  context: {
17835
+ base: '/',
17835
17836
  loadable: false,
17836
17837
  isLastPage: false,
17837
17838
  room: null,
@@ -18190,6 +18191,7 @@ function game_v2_1 (request) {
18190
18191
  }
18191
18192
  },
18192
18193
  connectGame: async (context, event) => {
18194
+ const returnProviders = ['RSG', 'KP', 'EPICWIN', 'KA', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG'];
18193
18195
  const { lang, isMobile } = context;
18194
18196
  const { providerId, gameId, gameTypeId, mappingId } = context.game;
18195
18197
  const params = {
@@ -18200,7 +18202,7 @@ function game_v2_1 (request) {
18200
18202
  is_demo: false,
18201
18203
  is_mobile: isMobile,
18202
18204
  lang,
18203
- return_url: window.location.href,
18205
+ return_url: returnProviders.includes(providerId) ? `${window.location.origin}${context.base}return` : window.location.href, // For providers to return.
18204
18206
  };
18205
18207
  const { redirect_url } = await request.send(game$1.playGame(params));
18206
18208
  return { gameURL: redirect_url }
@@ -21877,7 +21879,7 @@ function withdraw_vn (request) {
21877
21879
  submitWithdraw: async (context, event) => {
21878
21880
  const { bank, amount } = context;
21879
21881
  const { method } = context.paymentDetail[0];
21880
- const branchTemp = bank.bankCode === 'GCASH' ? '' : bank.branch;
21882
+ const branchTemp = ['GCASH', 'PAYM'].includes(bank.bankCode) ? '' : bank.branch;
21881
21883
  return await request.send(
21882
21884
  payment.submitWithdrawTransactionVN({
21883
21885
  method,
@@ -22362,7 +22364,7 @@ function withdraw_vn2 (request) {
22362
22364
  submitWithdraw: async (context, event) => {
22363
22365
  const { bank, amount } = context;
22364
22366
  const { method } = context.paymentDetail[0];
22365
- const branchTemp = bank.bankCode === 'GCASH' ? '' : bank.branch;
22367
+ const branchTemp = ['GCASH', 'PAYM'].includes(bank.bankCode) ? '' : bank.branch;
22366
22368
  return await request.send(
22367
22369
  payment.submitWithdrawTransactionVN({
22368
22370
  method,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.88",
3
+ "version": "1.1.90-1",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -10,6 +10,7 @@ export default function (request) {
10
10
  id: 'game',
11
11
  type: 'parallel',
12
12
  context: {
13
+ base: '/',
13
14
  loadable: false,
14
15
  isLastPage: false,
15
16
  room: null,
@@ -368,6 +369,7 @@ export default function (request) {
368
369
  }
369
370
  },
370
371
  connectGame: async (context, event) => {
372
+ const returnProviders = ['RSG', 'KP', 'EPICWIN', 'KA', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
371
373
  const { lang, isMobile } = context
372
374
  const { providerId, gameId, gameTypeId, mappingId } = context.game
373
375
  const params = {
@@ -378,7 +380,7 @@ export default function (request) {
378
380
  is_demo: false,
379
381
  is_mobile: isMobile,
380
382
  lang,
381
- return_url: window.location.href,
383
+ return_url: returnProviders.includes(providerId) ? `${window.location.origin}${context.base}return` : window.location.href, // For providers to return.
382
384
  }
383
385
  const { redirect_url } = await request.send(api.playGame(params))
384
386
  return { gameURL: redirect_url }
@@ -461,7 +461,7 @@ export default function (request) {
461
461
  submitWithdraw: async (context, event) => {
462
462
  const { bank, amount } = context
463
463
  const { method } = context.paymentDetail[0]
464
- const branchTemp = bank.bankCode === 'GCASH' ? '' : bank.branch
464
+ const branchTemp = ['GCASH', 'PAYM'].includes(bank.bankCode) ? '' : bank.branch
465
465
  return await request.send(
466
466
  payment.submitWithdrawTransactionVN({
467
467
  method,
@@ -452,7 +452,7 @@ export default function (request) {
452
452
  submitWithdraw: async (context, event) => {
453
453
  const { bank, amount } = context
454
454
  const { method } = context.paymentDetail[0]
455
- const branchTemp = bank.bankCode === 'GCASH' ? '' : bank.branch
455
+ const branchTemp = ['GCASH', 'PAYM'].includes(bank.bankCode) ? '' : bank.branch
456
456
  return await request.send(
457
457
  payment.submitWithdrawTransactionVN({
458
458
  method,