@jetthai/cuora 1.1.472 → 1.1.473-dev.0

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.
Files changed (85) hide show
  1. package/.claude/commands/sync-ai-prompts.md +88 -1
  2. package/.claude/settings.local.json +3 -1
  3. package/.github/copilot-instructions.md +64 -57
  4. package/.husky/post-checkout +3 -3
  5. package/.husky/pre-push +1 -1
  6. package/.prettierignore +2 -1
  7. package/AGENTS.md +64 -57
  8. package/AI_PROMPT_SOURCE.md +64 -57
  9. package/CHANGELOG.md +252 -5
  10. package/CLAUDE.md +64 -57
  11. package/GEMINI.md +64 -57
  12. package/README.md +11 -12
  13. package/package.json +1 -1
  14. package/scripts/auto-version.js +1 -0
  15. package/scripts/branch-auto-npm-publish.js +9 -2
  16. package/src/api/account.js +0 -1
  17. package/src/api/activity.js +2 -38
  18. package/src/api/auth.js +0 -31
  19. package/src/api/game.js +0 -10
  20. package/src/api/payment.js +1 -52
  21. package/src/api/user.js +0 -16
  22. package/src/index.js +2 -2
  23. package/src/machine/activity/activity_cash.js +62 -23
  24. package/src/machine/activity/diamond_shop_activity_cash.js +0 -1
  25. package/src/machine/activity/fafafa_activity.js +0 -10
  26. package/src/machine/activity/index.js +0 -12
  27. package/src/machine/auth.js +0 -59
  28. package/src/machine/auth_otp_v3.js +30 -19
  29. package/src/machine/common.js +0 -55
  30. package/src/machine/deposit/index.js +0 -28
  31. package/src/machine/deposit/manual_cash.js +0 -8
  32. package/src/machine/game_info.js +1 -12
  33. package/src/machine/game_v2_1.js +1 -89
  34. package/src/machine/honor_board_cash.js +15 -18
  35. package/src/machine/inbox.js +0 -12
  36. package/src/machine/index.js +0 -32
  37. package/src/machine/reward_cash.js +0 -39
  38. package/src/machine/user_reset_password.js +0 -13
  39. package/src/machine/user_sign_up.js +3 -0
  40. package/src/machine/websocket.js +0 -4
  41. package/src/machine/withdraw/index.js +0 -6
  42. package/src/request/request.js +1 -29
  43. package/src/util/constant.js +0 -1
  44. package/src/util/index.js +1 -4
  45. package/test/auth_otp_v3.test.js +192 -0
  46. package/src/machine/activity/activity.js +0 -209
  47. package/src/machine/activity/diamond_shop_activity_fc.js +0 -196
  48. package/src/machine/activity/diamond_shop_activity_vn.js +0 -178
  49. package/src/machine/activity/invite_friends_activity.js +0 -114
  50. package/src/machine/activity/mini_game_activity.js +0 -68
  51. package/src/machine/activity/return_bonus_activity.js +0 -153
  52. package/src/machine/auth_otp_v2.js +0 -177
  53. package/src/machine/bank_binding_amb.js +0 -146
  54. package/src/machine/bonus.js +0 -76
  55. package/src/machine/deposit/amb.js +0 -93
  56. package/src/machine/deposit/crypto_bank.js +0 -330
  57. package/src/machine/deposit/crypto_qrcode.js +0 -148
  58. package/src/machine/deposit/crypto_way.js +0 -252
  59. package/src/machine/deposit/deposit_fc.js +0 -272
  60. package/src/machine/deposit/direct.js +0 -310
  61. package/src/machine/deposit/float.js +0 -375
  62. package/src/machine/deposit/krway.js +0 -151
  63. package/src/machine/deposit/loadcard_vn.js +0 -351
  64. package/src/machine/deposit/manual_vn.js +0 -458
  65. package/src/machine/deposit/qrcode_v2.js +0 -338
  66. package/src/machine/deposit/usdt.js +0 -144
  67. package/src/machine/deposit/virtual_bank_vn.js +0 -269
  68. package/src/machine/deposit/vpay.js +0 -368
  69. package/src/machine/game_hot_new.js +0 -79
  70. package/src/machine/game_replay.js +0 -46
  71. package/src/machine/game_search_v2.js +0 -401
  72. package/src/machine/honor_board.js +0 -132
  73. package/src/machine/merge.js +0 -57
  74. package/src/machine/payment_data.js +0 -86
  75. package/src/machine/promotions.js +0 -170
  76. package/src/machine/reward.js +0 -255
  77. package/src/machine/reward_fc.js +0 -98
  78. package/src/machine/side.js +0 -154
  79. package/src/machine/side_v2.js +0 -211
  80. package/src/machine/vip_table.js +0 -57
  81. package/src/machine/welcome.js +0 -110
  82. package/src/machine/withdraw/withdraw_crypto_cash.js +0 -327
  83. package/src/machine/withdraw/withdraw_krway.js +0 -223
  84. package/src/machine/withdraw/withdraw_manual.js +0 -536
  85. package/src/util/math.js +0 -4
@@ -12,7 +12,6 @@ export default function (request) {
12
12
  type: 'parallel',
13
13
  context: {
14
14
  base: '/',
15
- batch: null,
16
15
  loadable: false,
17
16
  isLastPage: false,
18
17
  pageLoading: true,
@@ -65,9 +64,6 @@ export default function (request) {
65
64
  SET_STATIC_DATA: {
66
65
  actions: 'setStaticData',
67
66
  },
68
- SET_ADDITION_ENABLE: {
69
- actions: 'setAdditionEnable',
70
- },
71
67
  LOAD: {
72
68
  target: 'routing',
73
69
  actions: 'setLoadable',
@@ -81,9 +77,6 @@ export default function (request) {
81
77
  cond: 'isDifferentRoom',
82
78
  actions: ['setRoom', 'resetContent'],
83
79
  },
84
- BATCH: {
85
- target: 'batchFetching',
86
- },
87
80
  ENTER_GAME: {
88
81
  target: 'connecting',
89
82
  actions: ['setGameInfo', 'setLang', 'setEntry', 'setWalletType'],
@@ -101,18 +94,6 @@ export default function (request) {
101
94
  },
102
95
  },
103
96
  },
104
- batchFetching: {
105
- invoke: {
106
- src: 'batchFetch',
107
- onDone: {
108
- target: 'idle',
109
- actions: 'setBatch',
110
- },
111
- onError: {
112
- target: 'idle',
113
- },
114
- },
115
- },
116
97
  loading: {
117
98
  entry: 'increaseIndex',
118
99
  invoke: {
@@ -230,7 +211,7 @@ export default function (request) {
230
211
  actions: ['setSwitch', 'setLang', 'setEntry', 'setWalletType'],
231
212
  },
232
213
  ENTER_GAME_PAUSE: {
233
- actions: ['setIsPlaying', 'resetContent', 'resetSHA'],
214
+ actions: ['setIsPlaying', 'resetContent'],
234
215
  },
235
216
  ENTER_GAME: {
236
217
  target: 'connecting',
@@ -344,11 +325,6 @@ export default function (request) {
344
325
  staticData: event.data,
345
326
  }
346
327
  }),
347
- setAdditionEnable: assign((context, event) => {
348
- return {
349
- additionEnable: event.data,
350
- }
351
- }),
352
328
  setLoadable: assign((context, event) => {
353
329
  return {
354
330
  loadable: event.data,
@@ -366,11 +342,6 @@ export default function (request) {
366
342
  room: event.data,
367
343
  }
368
344
  }),
369
- setBatch: assign((context, event) => {
370
- return {
371
- batch: event.data,
372
- }
373
- }),
374
345
  resetContent: assign((context, event) => {
375
346
  return {
376
347
  loadable: false,
@@ -510,65 +481,6 @@ export default function (request) {
510
481
  },
511
482
  },
512
483
  services: {
513
- batchFetch: async (context, event) => {
514
- const { room, index, additionEnable, staticData } = context
515
- let requestChain = null
516
- if (!request.getToken()) {
517
- // 如果沒 token ,id 列表去 static 找
518
- const list = event.data.list.map((targetCategory, b) => {
519
- return {
520
- id: targetCategory.id,
521
- i18n: targetCategory.i18n,
522
- downLine: staticData
523
- .find((item) => item.category === targetCategory.id)
524
- .info.filter((item) => item.isGame)
525
- .slice(0, 20),
526
- }
527
- })
528
- return list.filter((item) => item.downLine.length > 0).slice(0, 6)
529
- } else if (additionEnable) {
530
- // [防呆] 確保有 categoryId
531
- const hasCategoryId = !!room?.categoryId
532
- const param = hasCategoryId ? { categoryId: room.categoryId, index, appSecret } : null
533
- // [防呆] 確保有 categoryId
534
- requestChain = event.data.list
535
- .filter((category) => category?.id != null)
536
- .map((category) =>
537
- request
538
- .send(
539
- api.getListCategory({
540
- categoryId: category.id,
541
- index: 0,
542
- appSecret,
543
- })
544
- )
545
- .then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame).slice(0, 20) }, category))
546
- )
547
- const promises = [...requestChain]
548
- if (hasCategoryId) {
549
- promises.push(request.send(api.getListAddition(param)))
550
- }
551
- const result = await Promise.all(promises)
552
- return result.filter((item) => item.downLine?.length > 0).slice(0, 6)
553
- } else {
554
- // [防呆] 確保有 categoryId
555
- requestChain = event.data.list
556
- .filter((category) => category?.id != null)
557
- .map((category) =>
558
- request
559
- .send(
560
- api.getListCategory({
561
- categoryId: category.id,
562
- index: 0,
563
- appSecret,
564
- })
565
- )
566
- .then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame).slice(0, 20) }, category))
567
- )
568
- const result = await Promise.all([...requestChain])
569
- return result.filter((item) => item.downLine.length > 0).slice(0, 6)
570
- }
571
- },
572
484
  getPageContent: async (context, event) => {
573
485
  const { room, index, additionEnable, staticData } = context
574
486
  // [防呆] 確保有 categoryId
@@ -1,6 +1,17 @@
1
1
  import { createMachine, assign } from 'xstate'
2
2
  import activity from '../api/activity.js'
3
3
 
4
+ const TAB_KEY_BY_TYPE = {
5
+ CASH_RAIN: 'cashRain',
6
+ DEPOSIT: 'deposit',
7
+ FREE_ROULETTE_SPIN: 'roulette',
8
+ JACKPOT: 'jackpot',
9
+ WIN_SCORE: 'bigWin',
10
+ WIN_MULTIPLIER: 'maxBet',
11
+ WITHDRAW: 'withdraw',
12
+ LATEST_BET: 'latestBet',
13
+ }
14
+
4
15
  export default function (request) {
5
16
  const { appSecret } = request.config
6
17
  return createMachine(
@@ -17,6 +28,7 @@ export default function (request) {
17
28
  bigWin: {},
18
29
  maxBet: {},
19
30
  withdraw: {},
31
+ latestBet: {},
20
32
  },
21
33
  states: {
22
34
  fetching: {
@@ -44,24 +56,8 @@ export default function (request) {
44
56
  actions: {
45
57
  setHonorBoardList: assign((context, event) => {
46
58
  return {
47
- tabs: (event.data || []).map((list) => {
48
- switch (list.type) {
49
- case 'CASH_RAIN':
50
- return 'cashRain'
51
- case 'DEPOSIT':
52
- return 'deposit'
53
- case 'FREE_ROULETTE_SPIN':
54
- return 'roulette'
55
- case 'JACKPOT':
56
- return 'jackpot'
57
- case 'WIN_SCORE':
58
- return 'bigWin'
59
- case 'WIN_MULTIPLIER':
60
- return 'maxBet'
61
- case 'WITHDRAW':
62
- return 'withdraw'
63
- }
64
- }),
59
+ // 後端新增的類型若尚未對應 tab key,略過以免產生 undefined tab
60
+ tabs: (event.data || []).map((list) => TAB_KEY_BY_TYPE[list.type]).filter(Boolean),
65
61
  cashRain: (event.data || []).find((item) => item.type === 'CASH_RAIN') || {},
66
62
  deposit: (event.data || []).find((item) => item.type === 'DEPOSIT') || {},
67
63
  roulette: (event.data || []).find((item) => item.type === 'FREE_ROULETTE_SPIN') || {},
@@ -69,6 +65,7 @@ export default function (request) {
69
65
  bigWin: (event.data || []).find((item) => item.type === 'WIN_SCORE') || {},
70
66
  maxBet: (event.data || []).find((item) => item.type === 'WIN_MULTIPLIER') || {},
71
67
  withdraw: (event.data || []).find((item) => item.type === 'WITHDRAW') || {},
68
+ latestBet: (event.data || []).find((item) => item.type === 'LATEST_BET') || {},
72
69
  }
73
70
  }),
74
71
  },
@@ -223,10 +223,6 @@ export default function (request) {
223
223
  PRESET_TAB: {
224
224
  actions: ['setCurrentTab', 'hideMessage'],
225
225
  },
226
- RESET: {
227
- target: '.loading',
228
- actions: 'reset',
229
- },
230
226
  INQUIRY_ACCOUNT: {
231
227
  target: '.inquiring',
232
228
  actions: 'resetPage',
@@ -283,14 +279,6 @@ export default function (request) {
283
279
  const lang = event.data.locale || context.lang || 'en-US'
284
280
  return { lang }
285
281
  }),
286
- reset: assign((context, event) => {
287
- return {
288
- currentTab: null,
289
- inbox: {},
290
- messageDetail: null,
291
- currentMessage: null,
292
- }
293
- }),
294
282
  resetPage: assign((context, event) => {
295
283
  const { inbox, currentTab } = JSON.parse(JSON.stringify(context))
296
284
  inbox[currentTab].page = -1
@@ -1,42 +1,26 @@
1
1
  import activity from './activity/index.js'
2
2
  import auth from './auth.js'
3
- import welcome from './welcome.js'
4
3
  import common from './common.js'
5
4
  import error from './error.js'
6
5
  import game_v2_1 from './game_v2_1.js'
7
6
  import game_favorite_v2 from './game_favorite_v2.js'
8
7
  import game_search_cash from './game_search_cash.js'
9
- import game_search_v2 from './game_search_v2.js'
10
- import game_hot_new from './game_hot_new.js'
11
8
  import game_info from './game_info.js'
12
- import game_replay from './game_replay.js'
13
9
  import game_betslip from './game_betslip.js'
14
10
  import inbox from './inbox.js'
15
- import merge from './merge.js'
16
- import payment_data from './payment_data.js'
17
- import reward_fc from './reward_fc.js'
18
- import reward from './reward.js'
19
11
  import reward_cash from './reward_cash.js'
20
12
  import setting from './setting.js'
21
- import side from './side.js'
22
- import side_v2 from './side_v2.js'
23
13
  import side_cash from './side_cash.js'
24
14
  import user_info from './user_info.js'
25
15
  import user_sign_up from './user_sign_up.js'
26
16
  import user_reset_password from './user_reset_password.js'
27
17
  import bank_binding from './bank_binding.js'
28
- import bank_binding_amb from './bank_binding_amb.js'
29
18
  import withdraw from './withdraw/index.js'
30
19
  import deposit from './deposit/index.js'
31
- import bonus from './bonus.js'
32
20
  import leaderboard from './leaderboard.js'
33
- import auth_otp_v2 from './auth_otp_v2.js'
34
21
  import auth_otp_v3 from './auth_otp_v3.js'
35
- import vip_table from './vip_table.js'
36
- import promotions from './promotions.js'
37
22
  import roulette_v2 from './roulette_v2.js'
38
23
  import honor_board_cash from './honor_board_cash.js'
39
- import honor_board from './honor_board.js'
40
24
  import user_photo from './user_photo.js'
41
25
  import navbar from './navbar.js'
42
26
  import websocket from './websocket.js'
@@ -45,42 +29,26 @@ import ranking from './ranking.js'
45
29
  export default {
46
30
  ...activity,
47
31
  auth,
48
- welcome,
49
32
  common,
50
33
  error,
51
34
  game_favorite_v2,
52
35
  game_search_cash,
53
- game_search_v2,
54
- game_hot_new,
55
36
  game_info,
56
- game_replay,
57
37
  game_betslip,
58
38
  inbox,
59
- merge,
60
- payment_data,
61
- reward,
62
39
  reward_cash,
63
- reward_fc,
64
40
  setting,
65
- side,
66
- side_v2,
67
41
  side_cash,
68
42
  game_v2_1,
69
43
  user_info,
70
44
  user_sign_up,
71
45
  user_reset_password,
72
46
  bank_binding,
73
- bank_binding_amb,
74
47
  ...deposit,
75
- bonus,
76
48
  leaderboard,
77
- auth_otp_v2,
78
49
  auth_otp_v3,
79
- vip_table,
80
- promotions,
81
50
  roulette_v2,
82
51
  honor_board_cash,
83
- honor_board,
84
52
  user_photo,
85
53
  navbar,
86
54
  ...withdraw,
@@ -63,10 +63,6 @@ export default function (request, context) {
63
63
  states: {
64
64
  idle: {
65
65
  on: {
66
- FETCH_WITHDRAW_RULE: {
67
- target: 'fetching',
68
- actions: 'setRewardData',
69
- },
70
66
  FETCH_OTHER_REWARD: {
71
67
  target: 'fetchingOtherReward',
72
68
  actions: 'setOrderColumn',
@@ -84,18 +80,6 @@ export default function (request, context) {
84
80
  },
85
81
  },
86
82
  },
87
- fetching: {
88
- invoke: {
89
- src: 'fetchWithdrawRulePreview',
90
- onDone: {
91
- target: 'pending',
92
- actions: 'setWithdrawRulePreview',
93
- },
94
- onError: {
95
- target: 'idle',
96
- },
97
- },
98
- },
99
83
  fetchingOtherReward: {
100
84
  invoke: {
101
85
  src: 'fetchOtherRewardList',
@@ -180,13 +164,6 @@ export default function (request, context) {
180
164
  otherRewardList: event.data[0]?.data,
181
165
  }
182
166
  }),
183
- setRewardData: assign((context, event) => {
184
- const { activityNo, receiveNo } = event.data
185
- return {
186
- activityNo,
187
- receiveNo,
188
- }
189
- }),
190
167
  setCallback: assign((context, event) => {
191
168
  return {
192
169
  callback: event.data?.callback || (() => {}),
@@ -200,11 +177,6 @@ export default function (request, context) {
200
177
  doCallback: (context, event) => {
201
178
  context.callback()
202
179
  },
203
- setWithdrawRulePreview: assign((context, event) => {
204
- return {
205
- withdrawRule: event.data,
206
- }
207
- }),
208
180
  setLang: assign((context, event) => {
209
181
  const lang = event.data.locale || context.lang || 'en-US'
210
182
  return { lang }
@@ -250,17 +222,6 @@ export default function (request, context) {
250
222
  const [otherRewardList] = await Promise.all([getOtherRewardAPI])
251
223
  return [otherRewardList]
252
224
  },
253
- fetchWithdrawRulePreview: async (context, event) => {
254
- const { receiveNo } = context
255
- const data = await request.send(
256
- payment.getWithdrawRulePreview({
257
- applyType: 'activity',
258
- applyNo: receiveNo,
259
- amount: null,
260
- })
261
- )
262
- return data
263
- },
264
225
  receiveReward: async (context, event) => {
265
226
  const { activityNo, receiveNo, attended } = event.data
266
227
  // Number("")-> 0 / Number(" ") -> 0 需要收到實際的數字才傳給後端
@@ -28,10 +28,6 @@ export default function (request) {
28
28
  target: 'otpFetching',
29
29
  actions: 'setOtpParamsEmail',
30
30
  },
31
- SEND_OTP_LOCAL: {
32
- target: 'otpFetching',
33
- actions: 'setOtpParamsLocal',
34
- },
35
31
  SEND_OTP_PHONE: {
36
32
  target: 'otpFetching',
37
33
  actions: 'setOtpParamsPhone',
@@ -157,15 +153,6 @@ export default function (request) {
157
153
  },
158
154
  }
159
155
  }),
160
- setOtpParamsLocal: assign((context, event) => {
161
- const { username } = event.data
162
- return {
163
- otpParams: {
164
- provider: 'local',
165
- username,
166
- },
167
- }
168
- }),
169
156
  setOtpParamsEmail: assign((context, event) => {
170
157
  const { email } = event.data
171
158
  return {
@@ -107,6 +107,7 @@ export default function (request) {
107
107
  return {
108
108
  signUpData: {
109
109
  provider: 'local',
110
+ birthday,
110
111
  ...pickBindData(event.data),
111
112
  birthday,
112
113
  email,
@@ -130,6 +131,7 @@ export default function (request) {
130
131
  return {
131
132
  signUpData: {
132
133
  provider: 'phone',
134
+ birthday,
133
135
  ...pickBindData(event.data),
134
136
  birthday,
135
137
  email,
@@ -152,6 +154,7 @@ export default function (request) {
152
154
  return {
153
155
  signUpData: {
154
156
  provider: 'email',
157
+ birthday,
155
158
  ...pickBindData(event.data),
156
159
  birthday,
157
160
  email,
@@ -73,10 +73,6 @@ export default function (request) {
73
73
  },
74
74
  },
75
75
  on: {
76
- CONNECT: {
77
- target: 'fetchSocket',
78
- cond: 'isNeedConnect',
79
- },
80
76
  SET_CONNECTED: {
81
77
  actions: 'setSocket',
82
78
  },
@@ -1,11 +1,5 @@
1
- import withdraw_manual from './withdraw_manual.js'
2
- import withdraw_krway from './withdraw_krway.js'
3
- import withdraw_crypto_cash from './withdraw_crypto_cash.js'
4
1
  import withdraw_manual_cash from './withdraw_manual_cash.js'
5
2
 
6
3
  export default {
7
- withdraw_manual,
8
- withdraw_krway,
9
- withdraw_crypto_cash,
10
4
  withdraw_manual_cash,
11
5
  }
@@ -6,7 +6,6 @@ import { getErr998SentryExtra } from '../util/err998SentryExtra.js'
6
6
  const supportVersion2List = [
7
7
  // 04-09 Update
8
8
  'game/play',
9
- 'game/gameReplay',
10
9
  'game/logout',
11
10
  'game/list/v3/root',
12
11
  'game/list/v3/category',
@@ -18,8 +17,6 @@ const supportVersion2List = [
18
17
  'game/list/v3/removeMyFavorite',
19
18
  'login',
20
19
  'callback/:strategy',
21
- 'guestLogin',
22
- 'appLogin',
23
20
  'logout',
24
21
  'self',
25
22
  'register',
@@ -27,7 +24,6 @@ const supportVersion2List = [
27
24
  'verify',
28
25
  'reset',
29
26
  'acknowledge',
30
- 'recovery',
31
27
  'recovery/abandon',
32
28
  'recovery/acknowledge',
33
29
  'checkDt',
@@ -56,7 +52,6 @@ const supportVersion2List = [
56
52
  'account-binding/status',
57
53
  'account-binding/bind',
58
54
  'account-binding/acknowledge',
59
- 'account-binding/bind-third-party',
60
55
  'feeds',
61
56
  'broadcast',
62
57
  'upload',
@@ -75,28 +70,21 @@ const supportVersion2List = [
75
70
  'payment/v2/convertFreeCredit',
76
71
  'payment/v2/getBindingBankList',
77
72
  'payment/v2/getBindingPaymentList',
78
- 'payment/v2/getWithdrawBankList',
79
- 'payment/v2/getCurrentWithdrawRule',
80
73
  'payment/v2/withdrawCheck',
81
- 'payment/v2/history',
82
- 'payment/v2/mergeWallet',
83
74
  'payment/v2/paymentDetail',
84
75
  'payment/v2/category/options',
85
76
  'payment/v2/paymentInfo',
86
77
  'payment/v2/getBindingPaymentInfo',
87
78
  'payment/v2/pendingOrder',
88
79
  'payment/v2/promotions',
89
- 'payment/v2/spotmarket',
90
80
  'payment/v2/transactionHistory',
91
81
  'payment/v2/updateUtr',
92
- 'payment/v2/setting',
93
82
  'payment/v2/amb/setting',
94
83
  'payment/v2/updatePaymentInfo',
95
84
  'payment/v2/uploadSlip',
96
85
  'payment/v2/withdrawRule',
97
86
  'payment/v2/:paymentType/getBankList',
98
87
  'payment/v2/:paymentType/transaction',
99
- 'payment/v2/:paymentType/checkTransaction',
100
88
  'payment/v2/:paymentType/bonus/preview',
101
89
  'payment/v2/:paymentType/expected/result',
102
90
  'payment/v2/:paymentType/crypto/expected/result',
@@ -111,7 +99,6 @@ const supportVersion2List = [
111
99
  'activities',
112
100
  'activities/types',
113
101
  'activities/promo',
114
- 'activities/viptable',
115
102
  'activities/level-bonus/info',
116
103
  'activities/numbers',
117
104
  'activities/honorBroadcast',
@@ -133,7 +120,6 @@ const supportVersion2List = [
133
120
  'friends/dashboard',
134
121
  'friends/dashboard/list',
135
122
  'activities/ranking',
136
- 'activities/activity/ranking',
137
123
  'activities/cashRain',
138
124
  'activities/jackpot/list',
139
125
  // 09/09
@@ -147,7 +133,6 @@ const supportVersion2List = [
147
133
  'account-binding/status',
148
134
  'account-binding/bind',
149
135
  'account-binding/acknowledge',
150
- 'account-binding/bind-third-party',
151
136
  'account-binding/bind-password',
152
137
  'account-binding/reset-otp',
153
138
  // 11/10
@@ -165,7 +150,6 @@ function isValid(value) {
165
150
  export default class Request {
166
151
  constructor(axios, config) {
167
152
  this.axios = axios
168
- this.source = axios.CancelToken.source()
169
153
  this.config = config
170
154
  this.sentry = config.sentry
171
155
  this.key = `cuora_${config.clientId}`
@@ -277,7 +261,7 @@ export default class Request {
277
261
  throw error
278
262
  }
279
263
  if (error.code !== 'ERR_800') {
280
- if (error.code) {
264
+ if (error.code && !req.silent) {
281
265
  this.errorHandler && this.errorHandler(error)
282
266
  }
283
267
  throw error
@@ -285,17 +269,6 @@ export default class Request {
285
269
  }
286
270
  }
287
271
 
288
- // 注意:send() 已不再預設附加 this.source.token(見 send 內註解),
289
- // sourceUpdate 僅對「呼叫端明確以 this.source.token 為 customToken」的請求有效;保留以維持 API 相容。
290
- sourceUpdate() {
291
- this.source.cancel('Requests Cancelled')
292
- this.source = this.axios.CancelToken.source()
293
- }
294
-
295
- sourceGenerate() {
296
- return this.axios.CancelToken.source()
297
- }
298
-
299
272
  _createConfig(req, cancelToken) {
300
273
  const { method, url, params, isPublic, isFormData, headers } = req
301
274
  let fullURL = this.config.fullURL
@@ -354,7 +327,6 @@ export default class Request {
354
327
  'activities/getFreeGameRewardList': 'activities/free-game/get-free-game-reward-list',
355
328
  'activities/lose-rebate/history': 'activities/rebate/lose-rebate/history',
356
329
  'activities/ranking': 'activities/ranking/promotion-ranking',
357
- 'activities/activity/ranking': 'activities/ranking/basic-ranking',
358
330
  'activities/cashRain': 'activities/cash-rain/exchange',
359
331
  'tournament/detail': 'activities/tournament/detail',
360
332
  'ranking/detail': 'activities/tournament/ranking/detail',
@@ -1,4 +1,3 @@
1
- export const MY_FAVORITE = 'MyFavorite'
2
1
  export const GAME_SEARCH = 'GameSearch'
3
2
  export const GAME_TYPE_LIST = [
4
3
  { typeId: 'SLOT', name: 'Slots', gameTypeMappingId: 1 },
package/src/util/index.js CHANGED
@@ -1,8 +1,5 @@
1
1
  import storage from './storage.js'
2
2
  import paramStore from './paramStore.js'
3
3
  import * as constant from './constant.js'
4
- import { max } from './math.js'
5
- import { isAmountInRange } from './amount.js'
6
4
 
7
- export default {}
8
- export { constant, storage, paramStore, max, isAmountInRange }
5
+ export { constant, storage, paramStore }