@jetthai/cuora 1.1.321-tg → 1.1.322

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,7 +2,7 @@
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.321-tg](https://github.com/jetthai/cuora-module/compare/v1.1.321...v1.1.321-tg) (2024-12-02)
5
+ ### [1.1.322](https://github.com/jetthai/cuora-module/compare/v1.1.321...v1.1.322) (2024-12-03)
6
6
 
7
7
  ### [1.1.321](https://github.com/jetthai/cuora-module/compare/v1.1.320...v1.1.321) (2024-12-02)
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.321-tg",
3
+ "version": "1.1.322",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -6,6 +6,12 @@ export default {
6
6
  params: { appSecret, include },
7
7
  isPublic: true,
8
8
  }),
9
+ getAllActivityList: ({ appSecret, include = 'cl' }) => ({
10
+ url: 'all-activities/list',
11
+ method: 'get',
12
+ params: { appSecret },
13
+ isPublic: true,
14
+ }),
9
15
  getJackpotList: ({ appSecret }) => ({
10
16
  url: 'activities/jackpot/list',
11
17
  method: 'get',
package/src/api/auth.js CHANGED
@@ -5,10 +5,10 @@ export default {
5
5
  method: 'post',
6
6
  isPublic: true,
7
7
  }),
8
- login: ({ username, password, provider, countryCode, phone, email, dt, reCaptchaToken, additionalUserInfo, loginType, isSignature }) => ({
8
+ login: ({ username, password, provider, countryCode, phone, email, dt, reCaptchaToken }) => ({
9
9
  url: 'login',
10
10
  method: 'post',
11
- params: { username, password, provider, countryCode, phone, email, dt, additionalUserInfo, loginType, isSignature },
11
+ params: { username, password, provider, countryCode, phone, email, dt },
12
12
  isPublic: true,
13
13
  headers: { 'x-access-captcha': reCaptchaToken },
14
14
  }),
@@ -163,7 +163,7 @@ export default function (request) {
163
163
  const isDoubleWallet = context.siteConfig?.walletMode === '4'
164
164
  const apiCallable = hasToken && isDoubleWallet
165
165
  const [{ data }, promotionList] = await Promise.all([
166
- request.send(activity.getActivityList({ appSecret })),
166
+ hasToken ? request.send(activity.getActivityList({ appSecret })) : request.send(activity.getAllActivityList({ appSecret })),
167
167
  apiCallable ? request.send(payment.getPromotionsList()) : [],
168
168
  ])
169
169
 
@@ -133,7 +133,7 @@ export default function (request) {
133
133
  fetchList: async (context, event) => {
134
134
  const hasToken = request.getToken()
135
135
  const [{ data }, promotionList] = await Promise.all([
136
- request.send(activity.getActivityList({ appSecret })),
136
+ hasToken ? request.send(activity.getActivityList({ appSecret })) : request.send(activity.getAllActivityList({ appSecret })),
137
137
  hasToken ? request.send(payment.getPromotionsList()) : [],
138
138
  ])
139
139
 
@@ -33,7 +33,6 @@ export default function (request) {
33
33
  email: null,
34
34
  username: null,
35
35
  password: null,
36
- additionalUserInfo: null,
37
36
  },
38
37
  countryAbbr: null,
39
38
  userInfo: {},
@@ -272,10 +271,6 @@ export default function (request) {
272
271
  LOGIN_APP: {
273
272
  target: '.authenticationApp',
274
273
  },
275
- LOGIN_TELEGRAM: {
276
- target: '.authentication',
277
- actions: 'setLoginTelegram',
278
- },
279
274
  SET_PLAY: {
280
275
  actions: 'setPlay',
281
276
  },
@@ -358,17 +353,6 @@ export default function (request) {
358
353
  },
359
354
  }
360
355
  }),
361
- setLoginTelegram: assign((context, event) => {
362
- const { loginType, additionalUserInfo, isSignature } = event.data
363
- return {
364
- loginData: {
365
- provider: 'telegram',
366
- loginType,
367
- additionalUserInfo,
368
- isSignature,
369
- },
370
- }
371
- }),
372
356
  fetchToken: assign((context, event) => {
373
357
  const token = storage.get(tokenKey)
374
358
  return {
@@ -110,6 +110,7 @@ export default class Request {
110
110
 
111
111
  _checkToken(req) {
112
112
  if (!req.isPublic && !this.getToken()) {
113
+ console.error(req)
113
114
  throw { code: 'ERR_A103', url: req.url }
114
115
  }
115
116
  }
@@ -23,6 +23,7 @@ const getDeviceToken = async ({ fpToken, sentry, hosts, enable = true }) => {
23
23
  throw new Error('[Device Token] No token from FingerprintJS.')
24
24
  }
25
25
 
26
+ console.log('[Device Token]', `${dt} from ${endpoints}`)
26
27
  sentry?.setTag('dt', dt)
27
28
  } catch (error) {
28
29
  console.error('[Device Token]', `${dt} from ${endpoints}`, error)