@jetthai/cuora 1.1.223 → 1.1.224

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,9 +2,9 @@
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.223](https://github.com/jetthai/cuora-module/compare/v1.1.222...v1.1.223) (2024-02-01)
5
+ ### [1.1.224](https://github.com/jetthai/cuora-module/compare/v1.1.222...v1.1.224) (2024-02-02)
6
6
 
7
- ### [1.1.222](https://github.com/jetthai/cuora-module/compare/v1.1.221...v1.1.222) (2024-02-01)
7
+ ### [1.1.222](https://github.com/jetthai/cuora-module/compare/v1.1.221...v1.1.222) (2024-02-02)
8
8
 
9
9
  ### [1.1.221](https://github.com/jetthai/cuora-module/compare/v1.1.220...v1.1.221) (2024-01-23)
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.223",
3
+ "version": "1.1.224",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
package/src/api/common.js CHANGED
@@ -1,6 +1,5 @@
1
1
  export default {
2
2
  getConfig: ({ appSecret }) => ({ url: 'getConfig', method: 'get', params: { appSecret }, isPublic: true }),
3
- getQuickLayout: ({ appSecret }) => ({ url: 'getQuickLayout', method: 'get', params: { appSecret }, isPublic: true }),
4
3
  feeds: ({ appSecret }) => ({ url: 'feeds', method: 'get', params: { appSecret }, isPublic: true }),
5
4
  broadcast: () => ({ url: 'broadcast', method: 'get', isPublic: true }),
6
5
  getAnnouncements: ({ appSecret }) => ({ url: 'getAnnouncements', params: { appSecret }, method: 'get', isPublic: true }),
@@ -29,7 +29,6 @@ export default function (request) {
29
29
  },
30
30
  paymentMethods: {},
31
31
  },
32
- quickConfig: null,
33
32
  userAgent: '',
34
33
  isMobile: false,
35
34
  announcementList: null,
@@ -57,10 +56,10 @@ export default function (request) {
57
56
  fetching: {
58
57
  entry: ['setUA', 'setAgent', 'setPixel', 'setKPixel'],
59
58
  invoke: {
60
- src: 'fetchConfig',
59
+ src: 'fetchSiteConfig',
61
60
  onDone: {
62
61
  target: 'idle',
63
- actions: 'setConfig',
62
+ actions: 'setSiteConfig',
64
63
  },
65
64
  onError: {
66
65
  target: 'idle',
@@ -159,12 +158,10 @@ export default function (request) {
159
158
  },
160
159
  },
161
160
  actions: {
162
- setConfig: assign((context, event) => {
163
- const { siteConfig, quickConfig } = event.data
164
- const { loginMethods = {}, registerMethods = {} } = siteConfig
161
+ setSiteConfig: assign((context, event) => {
162
+ const { loginMethods = {}, registerMethods = {} } = event.data
165
163
  return {
166
- siteConfig: { ...siteConfig, loginMethods: pickBy(loginMethods), registerMethods: pickBy(registerMethods) },
167
- quickConfig,
164
+ siteConfig: { ...event.data, loginMethods: pickBy(loginMethods), registerMethods: pickBy(registerMethods) },
168
165
  }
169
166
  }),
170
167
  setUA: assign((context, event) => {
@@ -268,9 +265,9 @@ export default function (request) {
268
265
  }),
269
266
  },
270
267
  services: {
271
- fetchConfig: async (context, event) => {
272
- const [config, quick] = await Promise.all([request.send(api.getConfig({ appSecret })), request.send(api.getQuickLayout({ appSecret }))])
273
- return { siteConfig: JSON.parse(window.atob(config)), quickConfig: JSON.parse(window.atob(quick)) }
268
+ fetchSiteConfig: async (context, event) => {
269
+ const { config } = await request.send(api.getConfig({ appSecret }))
270
+ return JSON.parse(window.atob(config))
274
271
  },
275
272
  fetchFeeds: async (context, event) => {
276
273
  return await request.send(api.feeds({ appSecret }))
@@ -472,7 +472,7 @@ export default function (request) {
472
472
  }
473
473
  },
474
474
  connectGame: async (context, event) => {
475
- const returnProviders = ['RSG', 'KP', 'EPICWIN', 'KA', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
475
+ const returnProviders = ['RSG', 'KP', 'EPICWIN', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
476
476
  const { lang, isMobile } = context
477
477
  const { providerId, gameId, gameTypeId, mappingId } = context.game
478
478
  const params = {