@jetthai/cuora 1.1.334 → 1.1.336-dev-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.
@@ -26,12 +26,16 @@ export default function () {
26
26
  { target: 'logout', cond: 'isLogout' },
27
27
  { target: 'deposit', cond: 'isNoBalance' },
28
28
  { target: 'unfinishedGame', cond: 'isUnfinishedGame', actions: 'setUnfinishedGame' },
29
+ { target: 'freeGameSettle', cond: 'isFreeGameSettle' },
30
+ { target: 'freeGameGiveUp', cond: 'isFreeGameGiveUp' },
29
31
  // { target: 'hall' },
30
32
  ],
31
33
  },
32
34
  logout: {},
33
35
  deposit: {},
34
36
  unfinishedGame: {},
37
+ freeGameSettle: {},
38
+ freeGameGiveUp: {},
35
39
  // hall: {},
36
40
  },
37
41
  },
@@ -65,6 +69,12 @@ export default function () {
65
69
  isUnfinishedGame: (context, event) => {
66
70
  return context.error.extend?.includes?.('unfinished_')
67
71
  },
72
+ isFreeGameSettle: (context, event) => {
73
+ return context.error.code === 'ERR_G124'
74
+ },
75
+ isFreeGameGiveUp: (context, event) => {
76
+ return context.error.code === 'ERR_G125'
77
+ },
68
78
  },
69
79
  services: {},
70
80
  }
@@ -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)