@jetthai/cuora 1.1.332-dev-5 → 1.1.332-dev-7

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.
@@ -33,6 +33,7 @@ export default function (request) {
33
33
  email: null,
34
34
  username: null,
35
35
  password: null,
36
+ additionalUserInfo: null,
36
37
  },
37
38
  countryAbbr: null,
38
39
  userInfo: {},
@@ -271,6 +272,10 @@ export default function (request) {
271
272
  LOGIN_APP: {
272
273
  target: '.authenticationApp',
273
274
  },
275
+ LOGIN_TELEGRAM: {
276
+ target: '.authentication',
277
+ actions: 'setLoginTelegram',
278
+ },
274
279
  SET_PLAY: {
275
280
  actions: 'setPlay',
276
281
  },
@@ -353,6 +358,17 @@ export default function (request) {
353
358
  },
354
359
  }
355
360
  }),
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
+ }),
356
372
  fetchToken: assign((context, event) => {
357
373
  const token = storage.get(tokenKey)
358
374
  return {
@@ -110,7 +110,6 @@ export default class Request {
110
110
 
111
111
  _checkToken(req) {
112
112
  if (!req.isPublic && !this.getToken()) {
113
- console.error(req)
114
113
  throw { code: 'ERR_A103', url: req.url }
115
114
  }
116
115
  }
@@ -1,5 +1,5 @@
1
1
  import uniqBy from 'lodash/uniqBy'
2
- import { load, defaultEndpoint } from '../lib/fingerprint_v3_11_2.js'
2
+ import { load, defaultEndpoint } from '../lib/fingerprint_v3_11_5.js'
3
3
 
4
4
  const reg = /fnapi\d*/
5
5
 
@@ -23,7 +23,6 @@ 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}`)
27
26
  sentry?.setTag('dt', dt)
28
27
  } catch (error) {
29
28
  console.error('[Device Token]', `${dt} from ${endpoints}`, error)