@jetthai/cuora 1.1.338-dev-6 → 1.1.338-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.
package/CHANGELOG.md CHANGED
@@ -2,33 +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.338-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.338-dev-5...v1.1.338-dev-6) (2025-02-13)
6
-
7
- ### [1.1.338-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.338-dev-4...v1.1.338-dev-5) (2025-02-13)
8
-
9
- ### [1.1.338-perf-3](https://github.com/jetthai/cuora-module/compare/v1.1.338-perf-2...v1.1.338-perf-3) (2025-02-12)
10
-
11
- ### [1.1.338-perf-2](https://github.com/jetthai/cuora-module/compare/v1.1.338-perf-1...v1.1.338-perf-2) (2025-02-12)
12
-
13
- ### [1.1.338-perf-1](https://github.com/jetthai/cuora-module/compare/v1.1.338-dev-3...v1.1.338-perf-1) (2025-02-12)
14
-
15
- ### [1.1.338-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.338-dev-3...v1.1.338-dev-4) (2025-02-12)
16
-
17
- ### [1.1.338-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.338-dev-2...v1.1.338-dev-3) (2025-02-11)
18
-
19
- ### [1.1.338-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.338-dev-1...v1.1.338-dev-2) (2025-02-07)
20
-
21
- ### [1.1.338-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.338...v1.1.338-dev-1) (2025-02-04)
22
-
23
- ### [1.1.336-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.337...v1.1.336-dev-10) (2025-02-04)
24
-
25
- ### [1.1.336-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.336-dev-8...v1.1.336-dev-9) (2025-02-03)
26
-
27
- ### [1.1.336-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.336-dev-7...v1.1.336-dev-8) (2025-02-03)
28
-
29
- ### [1.1.336-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.336-dev-6...v1.1.336-dev-7) (2025-01-24)
30
-
31
- ### [1.1.336-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.336...v1.1.336-dev-6) (2025-01-24)
5
+ ### [1.1.338-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.338...v1.1.338-dev-7) (2025-02-14)
32
6
 
33
7
  ### [1.1.338](https://github.com/jetthai/cuora-module/compare/v1.1.337...v1.1.338) (2025-02-04)
34
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.338-dev-6",
3
+ "version": "1.1.338-dev-7",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
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
  }),
package/src/api/common.js CHANGED
@@ -6,5 +6,4 @@ export default {
6
6
  getAnnouncements: ({ appSecret }) => ({ url: 'getAnnouncements', params: { appSecret }, method: 'get', isPublic: true }),
7
7
  getNavbar: ({ appSecret } = {}) => ({ url: 'getNavbarSetting', params: { appSecret }, method: 'get', isPublic: true }),
8
8
  getDefaultAffiliateCode: ({ appSecret }) => ({ url: 'getAffiliateCode', params: { appSecret }, method: 'get', isPublic: true }),
9
- getSiteInfoConfig: ({ appSecret, config }) => ({ url: 'get-site-config', method: 'get', params: { appSecret, config }, isPublic: true }),
10
9
  }
@@ -19,7 +19,6 @@ export default function (request) {
19
19
  refs: {},
20
20
  uidSite: '',
21
21
  siteConfig: {},
22
- isGame: false,
23
22
  },
24
23
  states: {
25
24
  init: {
@@ -68,10 +67,9 @@ export default function (request) {
68
67
  },
69
68
  pending: {
70
69
  after: {
71
- TIMEOUT: [
72
- { target: '#activity.fetchingList', cond: 'isNotInGame' },
73
- { target: '#activity.idle', cond: 'isInGame' },
74
- ],
70
+ TIMEOUT: {
71
+ target: '#activity.fetchingList',
72
+ },
75
73
  },
76
74
  on: {
77
75
  SET_UNREAD: {
@@ -79,10 +77,6 @@ export default function (request) {
79
77
  },
80
78
  REFRESH: {
81
79
  target: '#activity.fetchingList',
82
- actions: 'leaveGame',
83
- },
84
- RESET_ACTIVITIES: {
85
- actions: 'resetActivities',
86
80
  },
87
81
  },
88
82
  },
@@ -149,20 +143,6 @@ export default function (request) {
149
143
  uidSite,
150
144
  }
151
145
  }),
152
- resetActivities: assign((context, event) => {
153
- const { activityList = [], specifyActivities = [] } = context
154
- const keepActivities = activityList.filter((activity) => specifyActivities.includes(activity.activityType))
155
- return {
156
- isGame: true,
157
- activityList: keepActivities,
158
- promotionList: [],
159
- }
160
- }),
161
- leaveGame: assign((context, event) => {
162
- return {
163
- isGame: false,
164
- }
165
- }),
166
146
  },
167
147
  guards: {
168
148
  hasSpecifyActivities: (context, event) => {
@@ -170,12 +150,6 @@ export default function (request) {
170
150
  const filterActivityList = activityList.filter((activity) => specifyActivities.includes(activity.activityType))
171
151
  return filterActivityList.length > 0
172
152
  },
173
- isInGame: (context, event) => {
174
- return context.isGame
175
- },
176
- isNotInGame: (context, event) => {
177
- return !context.isGame
178
- },
179
153
  },
180
154
  delays: {
181
155
  TIMEOUT: (context, event) => {
@@ -190,7 +164,7 @@ export default function (request) {
190
164
  const apiCallable = hasToken && isDoubleWallet
191
165
  const [{ data }, promotionList] = await Promise.all([
192
166
  hasToken ? request.send(activity.getActivityList({ appSecret })) : request.send(activity.getAllActivityList({ appSecret })),
193
- apiCallable && !context.isGame ? request.send(payment.getPromotionsList()) : [],
167
+ apiCallable ? request.send(payment.getPromotionsList()) : [],
194
168
  ])
195
169
 
196
170
  return { activityList: data, promotionList }
@@ -14,9 +14,8 @@ export default function (request) {
14
14
  tournamentList: [],
15
15
  promotionList: [],
16
16
  uidSite: '',
17
- detailNeededActivityTypes: [4, 29, 34],
17
+ detailNeededActivityTypes: [29, 34],
18
18
  activityDetailList: [],
19
- isGame: false,
20
19
  },
21
20
  states: {
22
21
  fetchingList: {
@@ -48,10 +47,9 @@ export default function (request) {
48
47
  },
49
48
  pending: {
50
49
  after: {
51
- TIMEOUT: [
52
- { target: 'fetchingList', cond: 'isNotInGame' },
53
- { target: 'checking', cond: 'isInGame' },
54
- ],
50
+ TIMEOUT: {
51
+ target: 'fetchingList',
52
+ },
55
53
  },
56
54
  on: {
57
55
  SET_UNREAD: {
@@ -59,10 +57,6 @@ export default function (request) {
59
57
  },
60
58
  REFRESH: {
61
59
  target: '#activity.fetchingList',
62
- actions: 'leaveGame',
63
- },
64
- RESET_ACTIVITIES: {
65
- actions: 'resetActivities',
66
60
  },
67
61
  },
68
62
  },
@@ -122,32 +116,12 @@ export default function (request) {
122
116
  activityDetailList: event.data.map((item) => item.data),
123
117
  }
124
118
  }),
125
- resetActivities: assign((context, event) => {
126
- const { activityList = [], detailNeededActivityTypes = [] } = context
127
- const keepActivities = activityList.filter((activity) => detailNeededActivityTypes.includes(activity.activityType))
128
- return {
129
- isGame: true,
130
- activityList: keepActivities,
131
- promotionList: [],
132
- }
133
- }),
134
- leaveGame: assign((context, event) => {
135
- return {
136
- isGame: false,
137
- }
138
- }),
139
119
  },
140
120
  guards: {
141
121
  needFetchingDetail: (context, event) => {
142
122
  const { activityList = [], detailNeededActivityTypes } = context
143
123
  return activityList.filter((activity) => detailNeededActivityTypes.includes(activity.activityType)).length > 0
144
124
  },
145
- isInGame: (context, event) => {
146
- return context.isGame
147
- },
148
- isNotInGame: (context, event) => {
149
- return !context.isGame
150
- },
151
125
  },
152
126
  delays: {
153
127
  TIMEOUT: (context, event) => {
@@ -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 {
@@ -430,7 +414,7 @@ export default function (request) {
430
414
  }),
431
415
  redirectTo3Party: async (context, event) => {
432
416
  const { provider, channel, subchannel, fc } = event.data
433
- const deviceTokenEnable = context.siteConfig?.dtVerify
417
+ const deviceTokenEnable = context.siteConfig?.dtVerify === '1'
434
418
 
435
419
  const dt = await getDeviceToken({
436
420
  fpToken,
@@ -513,7 +497,7 @@ export default function (request) {
513
497
  return await request.send(user.getUserInfo())
514
498
  },
515
499
  checkDeviceToken: async (context, event) => {
516
- const deviceTokenEnable = context.siteConfig?.dtVerify
500
+ const deviceTokenEnable = context.siteConfig?.dtVerify === '1'
517
501
  if (deviceTokenEnable) {
518
502
  const { exist } = await request.send(user.checkDt())
519
503
  if (!exist) {
@@ -524,12 +508,7 @@ export default function (request) {
524
508
  },
525
509
  fetchSiteConfig: async (context, event) => {
526
510
  const { config } = await request.send(common.getConfig({ appSecret }))
527
- const parseConfig = JSON.parse(window.atob(config))
528
- return {
529
- loginMethods: parseConfig.loginMethods,
530
- registerMethods: parseConfig.registerMethods,
531
- dtVerify: parseConfig.dtVerify,
532
- }
511
+ return JSON.parse(window.atob(config))
533
512
  },
534
513
  },
535
514
  }
@@ -17,7 +17,7 @@ export default function (request) {
17
17
  lineat: null,
18
18
  },
19
19
  loginMethods: {},
20
- forceValidation: false,
20
+ forceValidation: '0',
21
21
  urls: {
22
22
  widget: null,
23
23
  },
@@ -40,7 +40,6 @@ export default function (request) {
40
40
  affiliateCode: null,
41
41
  defaultAffiliateCode: null,
42
42
  friendCode: null,
43
- isGame: false,
44
43
  },
45
44
  states: {
46
45
  config: {
@@ -104,18 +103,12 @@ export default function (request) {
104
103
  },
105
104
  waiting: {
106
105
  after: {
107
- TIMEOUT: [{ target: 'updating', cond: 'isNotInGame' }, { target: 'waiting' }],
106
+ TIMEOUT: {
107
+ target: 'updating',
108
+ },
108
109
  },
109
110
  },
110
111
  },
111
- on: {
112
- ENTER_GAME_PAUSE: {
113
- actions: 'resetByEnterGame',
114
- },
115
- LEAVE_GAME_REFRESH: {
116
- actions: 'leaveGame',
117
- },
118
- },
119
112
  },
120
113
  getAnnouncements: {
121
114
  initial: 'updating',
@@ -316,19 +309,6 @@ export default function (request) {
316
309
  sentNormalBroadcastList: [],
317
310
  }
318
311
  }),
319
- resetByEnterGame: assign((context, event) => {
320
- return {
321
- isGame: true,
322
- broadcastList: null,
323
- mailBoxInfo: null,
324
- promotions: null,
325
- }
326
- }),
327
- leaveGame: assign((context, event) => {
328
- return {
329
- isGame: false,
330
- }
331
- }),
332
312
  },
333
313
  guards: {
334
314
  isAffiliateCodeInstructionsEnable: (context, event) => {
@@ -336,9 +316,6 @@ export default function (request) {
336
316
  const { registerBindingAffiliateCodeInstructionsEnable } = siteConfig || {}
337
317
  return registerBindingAffiliateCodeInstructionsEnable ? JSON.parse(registerBindingAffiliateCodeInstructionsEnable) : false
338
318
  },
339
- isNotInGame: (context, event) => {
340
- return !context?.isGame
341
- },
342
319
  },
343
320
  services: {
344
321
  fetchConfig: async (context, event) => {
@@ -55,8 +55,8 @@ export default function (request) {
55
55
  target: 'fetching',
56
56
  cond: (context, event) => {
57
57
  const { siteConfig = {}, promotion = {}, selectedCrypto } = context
58
- const { walletMode = '', bonusPreviewEnable } = siteConfig
59
- return !!selectedCrypto && walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
58
+ const { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
59
+ return !!selectedCrypto && walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
60
60
  },
61
61
  },
62
62
  { target: 'loaded' },
@@ -72,8 +72,8 @@ export default function (request) {
72
72
  target: 'fetching',
73
73
  cond: (context, event) => {
74
74
  const { siteConfig = {}, promotion = {} } = context
75
- const { walletMode = '', bonusPreviewEnable } = siteConfig
76
- return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
75
+ const { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
76
+ return walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
77
77
  },
78
78
  },
79
79
  { target: 'loaded' },
@@ -49,8 +49,8 @@ export default function (request) {
49
49
  target: 'fetching',
50
50
  cond: (context, event) => {
51
51
  const { siteConfig = {}, promotion = {}, selectedCard } = context
52
- const { walletMode = '', bonusPreviewEnable } = siteConfig
53
- return !!selectedCard && walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
52
+ const { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
53
+ return !!selectedCard && walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
54
54
  },
55
55
  },
56
56
  { target: 'loaded' },
@@ -78,8 +78,8 @@ export default function (request) {
78
78
  actions: 'setCard',
79
79
  cond: (context, event) => {
80
80
  const { siteConfig = {}, promotion = {} } = context
81
- const { walletMode = '', bonusPreviewEnable } = siteConfig
82
- return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
81
+ const { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
82
+ return walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
83
83
  },
84
84
  },
85
85
  {
@@ -216,8 +216,8 @@ export default function (request) {
216
216
  actions: 'setCard',
217
217
  cond: (context, event) => {
218
218
  const { siteConfig = {}, promotion = {} } = context
219
- const { walletMode = '', bonusPreviewEnable } = siteConfig
220
- return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
219
+ const { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
220
+ return walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
221
221
  },
222
222
  },
223
223
  {
@@ -49,8 +49,8 @@ export default function (request) {
49
49
  target: 'fetching',
50
50
  cond: (context, event) => {
51
51
  const { siteConfig = {}, promotion = {}, selectedQrcode } = context
52
- const { walletMode = '', bonusPreviewEnable } = siteConfig
53
- return !!selectedQrcode && walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
52
+ const { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
53
+ return !!selectedQrcode && walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
54
54
  },
55
55
  },
56
56
  {
@@ -86,8 +86,8 @@ export default function (request) {
86
86
  actions: 'setQrcode',
87
87
  cond: (context, event) => {
88
88
  const { siteConfig = {}, promotion = {} } = context
89
- const { walletMode = '', bonusPreviewEnable } = siteConfig
90
- return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
89
+ const { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
90
+ return walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
91
91
  },
92
92
  },
93
93
  {
@@ -314,8 +314,8 @@ export default function (request) {
314
314
  actions: 'setQrcode',
315
315
  cond: (context, event) => {
316
316
  const { siteConfig = {}, promotion = {} } = context
317
- const { walletMode = '', bonusPreviewEnable } = siteConfig
318
- return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
317
+ const { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
318
+ return walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
319
319
  },
320
320
  },
321
321
  {
@@ -74,8 +74,8 @@ export default function (request) {
74
74
  target: 'fetching',
75
75
  cond: (context, event) => {
76
76
  const { siteConfig = {}, promotion = {} } = context
77
- const { walletMode = '', bonusPreviewEnable } = siteConfig
78
- return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
77
+ const { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
78
+ return walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
79
79
  },
80
80
  },
81
81
  { target: 'loaded' },
@@ -48,7 +48,6 @@ export default function (request) {
48
48
  gameHtml: null,
49
49
  gameWalletType: null,
50
50
  switchGame: null,
51
- isGame: false,
52
51
  ...oldContext,
53
52
  },
54
53
  states: {
@@ -203,13 +202,6 @@ export default function (request) {
203
202
  target: 'connectSwitching',
204
203
  actions: ['setSwitch', 'setLang'],
205
204
  },
206
- ENTER_GAME_PAUSE: {
207
- actions: ['setIsGame', 'resetContent', 'resetSHA'],
208
- },
209
- LEAVE_GAME_REFRESH: {
210
- target: '#game.oldTimer',
211
- actions: 'setIsGame',
212
- },
213
205
  },
214
206
  },
215
207
  refreshing: {
@@ -244,11 +236,6 @@ export default function (request) {
244
236
  actions: 'setGameURL',
245
237
  },
246
238
  },
247
- on: {
248
- LEAVE_GAME_REFRESH: {
249
- actions: 'setIsGame',
250
- },
251
- },
252
239
  },
253
240
  },
254
241
  },
@@ -260,7 +247,7 @@ export default function (request) {
260
247
  20000: [
261
248
  {
262
249
  target: 'updating',
263
- cond: 'hasRoomAndIsNotInGame',
250
+ cond: 'hasRoom',
264
251
  },
265
252
  {
266
253
  target: 'pending',
@@ -326,15 +313,9 @@ export default function (request) {
326
313
  },
327
314
  pending: {
328
315
  after: {
329
- 20000: [
330
- {
331
- target: 'fetchingGameSHA',
332
- cond: 'isNotInGame',
333
- },
334
- {
335
- target: 'pending',
336
- },
337
- ],
316
+ 20000: {
317
+ target: 'fetchingGameSHA',
318
+ },
338
319
  },
339
320
  },
340
321
  },
@@ -486,11 +467,6 @@ export default function (request) {
486
467
  pageLoading: false,
487
468
  }
488
469
  }),
489
- setIsGame: assign((context, event) => {
490
- return {
491
- isGame: event.data,
492
- }
493
- }),
494
470
  ...oldActions,
495
471
  },
496
472
  guards: {
@@ -500,12 +476,7 @@ export default function (request) {
500
476
  // 是否有下一頁
501
477
  return loadable && !isLastPage
502
478
  },
503
- isNotInGame: (context, event) => {
504
- return !context.isGame
505
- },
506
- hasRoomAndIsNotInGame: (context, event) => {
507
- return context.room?.categoryId && !context.isGame
508
- },
479
+ hasRoom: (context, event) => context.room?.categoryId,
509
480
  ...oldGuards,
510
481
  },
511
482
  services: {
@@ -520,7 +491,7 @@ export default function (request) {
520
491
  i18n: targetCategory.i18n,
521
492
  downLine: staticData
522
493
  .find((item) => item.category === targetCategory.id)
523
- .info.filter((item) => item.isGame)
494
+ .info.filter((item) => item.isGame === true)
524
495
  .slice(0, 20),
525
496
  }
526
497
  })
@@ -535,7 +506,7 @@ export default function (request) {
535
506
  index: 0,
536
507
  })
537
508
  )
538
- .then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame).slice(0, 20) }, category))
509
+ .then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame === true).slice(0, 20) }, category))
539
510
  })
540
511
  const result = await Promise.all([...requestChain, request.send(api.getListAddition(param))])
541
512
  return result.filter((item) => item.downLine.length > 0).slice(0, 6)
@@ -548,7 +519,7 @@ export default function (request) {
548
519
  index: 0,
549
520
  })
550
521
  )
551
- .then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame).slice(0, 20) }, category))
522
+ .then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame === true).slice(0, 20) }, category))
552
523
  })
553
524
  const result = await Promise.all([...requestChain])
554
525
  return result.filter((item) => item.downLine.length > 0).slice(0, 6)
@@ -669,16 +640,6 @@ const oldActions = {
669
640
  optionMap: { ...optionMap, ...event.data },
670
641
  }
671
642
  }),
672
- resetSHA: assign((context, event) => {
673
- return {
674
- sha: {
675
- status: null,
676
- },
677
- isStatusChanged: false,
678
- statusMap: {},
679
- optionMap: {},
680
- }
681
- }),
682
643
  }
683
644
 
684
645
  const oldGuards = {
@@ -9,7 +9,6 @@ export default function (request) {
9
9
  type: 'parallel',
10
10
  context: {
11
11
  tick: 6000,
12
- isGame: false,
13
12
  },
14
13
  states: {
15
14
  feed: {
@@ -31,7 +30,6 @@ export default function (request) {
31
30
  after: {
32
31
  TIMEOUT: {
33
32
  target: 'updating',
34
- cond: 'isNotInGame',
35
33
  },
36
34
  },
37
35
  },
@@ -44,7 +42,6 @@ export default function (request) {
44
42
  on: {
45
43
  START_BROADCAST: {
46
44
  target: 'picking',
47
- actions: 'leaveGame',
48
45
  },
49
46
  },
50
47
  },
@@ -105,21 +102,10 @@ export default function (request) {
105
102
  }),
106
103
  resetBroadcast: assign((context, event) => {
107
104
  return {
108
- isGame: true,
109
105
  normalBroadcast: null,
110
106
  sentNormalBroadcastList: [],
111
107
  }
112
108
  }),
113
- leaveGame: assign((context, event) => {
114
- return {
115
- isGame: false,
116
- }
117
- }),
118
- },
119
- guards: {
120
- isNotInGame: (context, event) => {
121
- return !context.isGame
122
- },
123
109
  },
124
110
  services: {
125
111
  fetchHonorBoardList: async (context, event) => {
@@ -16,7 +16,6 @@ export default function (request) {
16
16
  receiveNo: null,
17
17
  withdrawRule: {},
18
18
  rewardType: null,
19
- isGame: false,
20
19
  callback: () => {},
21
20
  },
22
21
  states: {
@@ -37,7 +36,7 @@ export default function (request) {
37
36
  },
38
37
  pending: {
39
38
  after: {
40
- 20000: { target: 'loading', cond: 'isNotInGame' },
39
+ 20000: { target: 'loading' },
41
40
  },
42
41
  },
43
42
  },
@@ -64,9 +63,6 @@ export default function (request) {
64
63
  target: 'allPointsReceiving',
65
64
  actions: 'setCallback',
66
65
  },
67
- SET_IS_GAME: {
68
- actions: 'setIsGame',
69
- },
70
66
  },
71
67
  },
72
68
  fetching: {
@@ -161,20 +157,12 @@ export default function (request) {
161
157
  withdrawRule: event.data,
162
158
  }
163
159
  }),
164
- setIsGame: assign((context, event) => {
165
- return {
166
- isGame: event.data,
167
- }
168
- }),
169
160
  },
170
161
  guards: {
171
162
  isPrize: (context, event) => {
172
163
  const { rewardType } = context
173
164
  return rewardType === 'PRIZE'
174
165
  },
175
- isNotInGame: (context, event) => {
176
- return !context.isGame
177
- },
178
166
  },
179
167
  services: {
180
168
  fetchRewardList: async (context, event) => {
@@ -16,7 +16,6 @@ export default function (request) {
16
16
  activityNo: null,
17
17
  receiveNo: null,
18
18
  withdrawRule: {},
19
- isGame: false,
20
19
  callback: () => {},
21
20
  },
22
21
  states: {
@@ -47,7 +46,7 @@ export default function (request) {
47
46
  },
48
47
  pending: {
49
48
  after: {
50
- 20000: [{ target: 'loading', cond: 'isNotInGame' }, { target: 'pending' }],
49
+ 20000: { target: 'loading' },
51
50
  },
52
51
  },
53
52
  },
@@ -74,9 +73,6 @@ export default function (request) {
74
73
  target: 'allPointsReceiving',
75
74
  actions: 'setCallback',
76
75
  },
77
- SET_IS_GAME: {
78
- actions: 'setIsGame',
79
- },
80
76
  },
81
77
  },
82
78
  fetching: {
@@ -147,11 +143,6 @@ export default function (request) {
147
143
  },
148
144
  },
149
145
  {
150
- guards: {
151
- isNotInGame: (context, event) => {
152
- return !context.isGame
153
- },
154
- },
155
146
  actions: {
156
147
  setAuth: assign((context, event) => {
157
148
  return { auth: !!event.data }
@@ -183,11 +174,6 @@ export default function (request) {
183
174
  withdrawRule: event.data,
184
175
  }
185
176
  }),
186
- setIsGame: assign((context, event) => {
187
- return {
188
- isGame: event.data,
189
- }
190
- }),
191
177
  },
192
178
  services: {
193
179
  fetchRewardList: async (context, event) => {
@@ -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)