@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
@@ -18,6 +18,7 @@ export default function (request) {
18
18
  detailNeededActivityTypes: [4, 29, 34],
19
19
  activityDetailList: [],
20
20
  isPlaying: false,
21
+ listAuthKey: null,
21
22
  },
22
23
  states: {
23
24
  fetchingList: {
@@ -25,7 +26,7 @@ export default function (request) {
25
26
  src: 'fetchList',
26
27
  onDone: {
27
28
  target: 'checking',
28
- actions: ['setActivityList', 'setTournamentList', 'setPromotionList', 'setProgressSummary'],
29
+ actions: ['setActivityList', 'setTournamentList', 'setPromotionList', 'setListAuthKey'],
29
30
  },
30
31
  onError: {
31
32
  target: 'pending',
@@ -40,7 +41,7 @@ export default function (request) {
40
41
  src: 'fetchActivityDetailList',
41
42
  onDone: {
42
43
  target: 'pending',
43
- actions: 'setActivityDetailList',
44
+ actions: ['setActivityDetailList', 'setProgressSummary'],
44
45
  },
45
46
  onError: {
46
47
  target: 'pending',
@@ -58,16 +59,18 @@ export default function (request) {
58
59
  SET_UNREAD: {
59
60
  actions: 'setUnread',
60
61
  },
61
- REFRESH: {
62
- target: '#activity.fetchingList',
63
- actions: 'leaveGame',
64
- },
65
62
  RESET_ACTIVITIES: {
66
63
  actions: 'resetActivities',
67
64
  },
68
65
  },
69
66
  },
70
67
  },
68
+ on: {
69
+ REFRESH: {
70
+ target: '#activity.fetchingList',
71
+ actions: 'leaveGame',
72
+ },
73
+ },
71
74
  },
72
75
  {
73
76
  actions: {
@@ -98,7 +101,7 @@ export default function (request) {
98
101
  }
99
102
  }),
100
103
  setProgressSummary: assign((context, event) => {
101
- const { progressSummary } = event.data
104
+ const { progressSummary } = event.data || {}
102
105
  return {
103
106
  progressSummary: progressSummary || null,
104
107
  }
@@ -125,8 +128,20 @@ export default function (request) {
125
128
  }
126
129
  }),
127
130
  setActivityDetailList: assign((context, event) => {
131
+ if (!event.data) return {}
132
+ const { activityDetailList } = event.data
133
+ return {
134
+ activityDetailList: activityDetailList.map((item) => item.data),
135
+ }
136
+ }),
137
+ setListAuthKey: assign((context, event) => {
138
+ const listAuthKey = event.data.authKey || null
139
+ // 身分變回訪客時一併清空明細(例如登出後的 REFRESH):
140
+ // guard 會讓訪客身分直接跳過 fetchingDetailList,若不在這裡清空,
141
+ // activityDetailList 會殘留登出前的會員資料,導致輪盤/紅包雨顯示錯誤身分的結果。
128
142
  return {
129
- activityDetailList: event.data.map((item) => item.data),
143
+ listAuthKey,
144
+ ...(listAuthKey ? {} : { activityDetailList: [], progressSummary: {} }),
130
145
  }
131
146
  }),
132
147
  resetActivities: assign((context, event) => {
@@ -142,7 +157,8 @@ export default function (request) {
142
157
  },
143
158
  guards: {
144
159
  needFetchingDetail: (context, event) => {
145
- const { activityList = [], detailNeededActivityTypes } = context
160
+ const { activityList = [], detailNeededActivityTypes, listAuthKey } = context
161
+ if (!listAuthKey) return false
146
162
  return activityList.filter((activity) => detailNeededActivityTypes.includes(activity.activityType)).length > 0
147
163
  },
148
164
  isInGame: (context, event) => {
@@ -160,35 +176,58 @@ export default function (request) {
160
176
  },
161
177
  services: {
162
178
  fetchList: async (context, event) => {
163
- const hasToken = request.getToken()
164
- const siteConfig = window?.$nuxt?.$store?.state?.siteConfig
165
- const isProgressEnable = siteConfig?.frontendActivityProgressEnable
179
+ const authKey = request.getToken() || null
180
+ const hasToken = !!authKey
166
181
 
167
- const [{ data }, promotionList, progressSummaryRes] = await Promise.all([
182
+ const [{ data }, promotionList] = await Promise.all([
168
183
  hasToken ? request.send(activity.getActivityList({ appSecret })) : request.send(activity.getAllActivityList({ appSecret })),
169
184
  hasToken ? request.send(payment.getPromotionsList()) : [],
170
- hasToken && isProgressEnable ? request.send(activity.getProgressSummary({ appSecret })).catch(() => null) : null,
171
185
  ])
172
186
 
187
+ // send() 不保證回傳 { data } 信封(200 但 body 非 JSON 時回字串,data 即為 undefined)。非陣列必須在 service 內 reject 走 onError,
188
+ // 不可進入 setActivityList:assign 內拋錯會讓 interpreter 清空事件佇列,machine 永久停在 fetchingList、輪詢中止
189
+ if (!Array.isArray(data)) {
190
+ throw new Error('[activity_cash] fetchList: activityList is not an array')
191
+ }
192
+
173
193
  return {
174
194
  activityList: data,
175
195
  promotionList,
176
- progressSummary: progressSummaryRes?.data || null,
196
+ authKey,
177
197
  }
178
198
  },
179
199
  fetchActivityDetailList: async (context, event) => {
200
+ const { listAuthKey } = context
180
201
  await new Promise((resolve) => setTimeout(resolve, 1000)) // delay 1 second
181
- const hasToken = request.getToken()
202
+
203
+ // 抓清單時是訪客,或這 1 秒內身分換過(?x= 登入落地)→ 不發,等 REFRESH 用正確身分重抓
204
+ if (!listAuthKey || request.getToken() !== listAuthKey) return null
205
+
206
+ const siteConfig = window?.$nuxt?.$store?.state?.siteConfig
207
+ const isProgressEnable = siteConfig?.frontendActivityProgressEnable
182
208
 
183
209
  const { activityList = [], detailNeededActivityTypes } = context
184
210
  const filteredActivityList = activityList.filter((activity) => detailNeededActivityTypes.includes(activity.activityType))
185
- return hasToken
186
- ? await Promise.all(
187
- filteredActivityList.map((item) => {
188
- return request.send(activity.getActivityDetail({ activityNo: item.activityNo, appSecret }))
189
- })
190
- )
191
- : []
211
+
212
+ const [activityDetailList, progressSummaryRes] = await Promise.all([
213
+ Promise.all(
214
+ filteredActivityList.map((item) => {
215
+ return request.send(activity.getActivityDetail({ activityNo: item.activityNo, appSecret, silent: true }))
216
+ })
217
+ ),
218
+ isProgressEnable ? request.send(activity.getProgressSummary({ appSecret })).catch(() => null) : Promise.resolve(null),
219
+ ])
220
+
221
+ // ERR_800/維護中時 send() 回 undefined,進到 setActivityDetailList 讀 item.data 會在 assign 內拋錯而卡死 machine;
222
+ // 整輪 reject 走 onError,保留上一輪明細並於下個 TIMEOUT 重試
223
+ if (!activityDetailList.every((res) => res !== null && typeof res === 'object')) {
224
+ throw new Error('[activity_cash] fetchActivityDetailList: invalid detail response')
225
+ }
226
+
227
+ return {
228
+ activityDetailList,
229
+ progressSummary: progressSummaryRes?.data || null,
230
+ }
192
231
  },
193
232
  },
194
233
  }
@@ -57,7 +57,6 @@ export default function (request) {
57
57
  },
58
58
  SETTLE_AMOUNT: {
59
59
  target: 'settling',
60
- actions: 'setCallback',
61
60
  cond: 'settlable',
62
61
  },
63
62
  },
@@ -60,11 +60,6 @@ export default function (request, context) {
60
60
  },
61
61
  awarded: {
62
62
  entry: 'setDuration',
63
- on: {
64
- REFRESH_ACTIVITY: {
65
- target: 'loading',
66
- },
67
- },
68
63
  after: {
69
64
  1000: [{ target: 'loading', cond: 'shouldCheckNewPeriod' }, { target: 'awarded' }],
70
65
  },
@@ -102,11 +97,6 @@ export default function (request, context) {
102
97
  },
103
98
  result: {
104
99
  entry: 'setDuration',
105
- on: {
106
- REFRESH_ACTIVITY: {
107
- target: 'loading',
108
- },
109
- },
110
100
  after: {
111
101
  1000: [{ target: 'loading', cond: 'shouldCheckNewPeriod' }, { target: 'result' }],
112
102
  },
@@ -1,21 +1,15 @@
1
- import activity from './activity.js'
2
1
  import activity_cash from './activity_cash.js'
3
2
  import continue_deposit_activity from './continue_deposit_activity.js'
4
3
  import deposit_activity from './deposit_activity.js'
5
- import diamond_shop_activity_fc from './diamond_shop_activity_fc.js'
6
- import diamond_shop_activity_vn from './diamond_shop_activity_vn.js'
7
4
  import diamond_shop_activity_cash from './diamond_shop_activity_cash.js'
8
5
  import fafafa_activity from './fafafa_activity.js'
9
- import invite_friends_activity from './invite_friends_activity.js'
10
6
  import jackpot from './jackpot.js'
11
7
  import friend_invite_friends_activity from './friend_invite_friends_activity.js'
12
8
  import ranking_activity from './ranking_activity.js'
13
- import return_bonus_activity from './return_bonus_activity.js'
14
9
  import specify_bets_activity from './specify_bets_activity.js'
15
10
  import specify_turnover_activity from './specify_turnover_activity.js'
16
11
  import sign_in_activity from './sign_in_activity.js'
17
12
  import time_bomb_activity from './time_bomb_activity.js'
18
- import mini_game_activity from './mini_game_activity.js'
19
13
  import roulette_activity_v2 from './roulette_activity_v2.js'
20
14
  import sign_in_monthly_activity from './sign_in_monthly_activity.js'
21
15
  import otp_verified_activity from './otp_verified_activity.js'
@@ -24,24 +18,18 @@ import instant_rebate_activity from './instant_rebate_activity.js'
24
18
  import cash_rain_activity from './cash_rain_activity.js'
25
19
 
26
20
  export default {
27
- activity,
28
21
  activity_cash,
29
22
  continue_deposit_activity,
30
23
  deposit_activity,
31
- diamond_shop_activity_fc,
32
- diamond_shop_activity_vn,
33
24
  diamond_shop_activity_cash,
34
25
  fafafa_activity,
35
- invite_friends_activity,
36
26
  jackpot,
37
27
  friend_invite_friends_activity,
38
28
  ranking_activity,
39
- return_bonus_activity,
40
29
  specify_bets_activity,
41
30
  specify_turnover_activity,
42
31
  sign_in_activity,
43
32
  time_bomb_activity,
44
- mini_game_activity,
45
33
  roulette_activity_v2,
46
34
  sign_in_monthly_activity,
47
35
  otp_verified_activity,
@@ -10,7 +10,6 @@ import { readParamFromLocation, writeParam, normalize, AC_KEYS, FC_KEYS } from '
10
10
  export default function (request) {
11
11
  const { appSecret, clientId, sentry } = request.config
12
12
  const tokenKey = `cuora_${clientId}`
13
- const userKey = `cuora_tempuser`
14
13
  const phoneCountryCode = 'phone_countrycode'
15
14
  const accountPhoneKey = 'account_phone'
16
15
  const accountEmailKey = 'account_email'
@@ -79,32 +78,6 @@ export default function (request) {
79
78
  },
80
79
  },
81
80
  },
82
- authenticationGuest: {
83
- invoke: {
84
- src: 'authenticateGuest',
85
- onDone: {
86
- target: 'authenticated',
87
- actions: 'setToken',
88
- },
89
- onError: {
90
- target: 'idle',
91
- actions: 'removeToken',
92
- },
93
- },
94
- },
95
- authenticationApp: {
96
- invoke: {
97
- src: 'authenticateApp',
98
- onDone: {
99
- target: 'authenticated',
100
- actions: ['setToken'],
101
- },
102
- onError: {
103
- target: 'idle',
104
- actions: 'removeToken',
105
- },
106
- },
107
- },
108
81
  authenticated: {
109
82
  invoke: {
110
83
  src: 'fetchUserInfo',
@@ -292,9 +265,6 @@ export default function (request) {
292
265
  CLEAR: {
293
266
  target: '.logout',
294
267
  },
295
- LOGIN_GUEST: {
296
- target: '.authenticationGuest',
297
- },
298
268
  LOGIN_ID: {
299
269
  target: '.authentication',
300
270
  actions: ['setReCaptchaToken', 'setLoginId'],
@@ -307,16 +277,9 @@ export default function (request) {
307
277
  target: '.authentication',
308
278
  actions: ['setReCaptchaToken', 'setLoginEmail'],
309
279
  },
310
- LOGIN_LOCAL: {
311
- target: '.authentication',
312
- actions: 'setLoginLocal',
313
- },
314
280
  LOGIN_3PARTY: {
315
281
  actions: 'redirectTo3Party',
316
282
  },
317
- LOGIN_APP: {
318
- target: '.authenticationApp',
319
- },
320
283
  LOGIN_TELEGRAM: {
321
284
  target: '.authentication',
322
285
  actions: 'setLoginTelegram',
@@ -402,20 +365,6 @@ export default function (request) {
402
365
  },
403
366
  }
404
367
  }),
405
- setLoginLocal: assign((context, event) => {
406
- const { username, password } = event.data
407
- storage.set(userKey, username, {
408
- path: '/',
409
- maxAge: 60 * 60 * 24,
410
- })
411
- return {
412
- loginData: {
413
- provider: 'local',
414
- username,
415
- password,
416
- },
417
- }
418
- }),
419
368
  setLoginTelegram: assign((context, event) => {
420
369
  const { loginType, additionalUserInfo, isSignature, idToken } = event.data
421
370
  return {
@@ -569,19 +518,11 @@ export default function (request) {
569
518
  }),
570
519
  },
571
520
  services: {
572
- authenticateApp: async (context, event) => {
573
- const { token } = await request.send(auth.loginApp(event.data))
574
- return token
575
- },
576
521
  authenticate: async (context, event) => {
577
522
  const data = { ...context.loginData, reCaptchaToken: context.reCaptchaToken }
578
523
  const { token } = await request.send(auth.login(data))
579
524
  return token
580
525
  },
581
- authenticateGuest: async (context, event) => {
582
- const { token } = await request.send(auth.guestLogin())
583
- return token
584
- },
585
526
  logout: async (context, event) => {
586
527
  return await request.send(auth.logout())
587
528
  },
@@ -48,16 +48,29 @@ export default function (request) {
48
48
  { target: 'notVerified', cond: 'isNotVerified' },
49
49
  ],
50
50
  },
51
+ autoVerifying: {
52
+ invoke: {
53
+ src: 'fetchUserInfo',
54
+ onDone: {
55
+ target: 'checkingAutoVerification',
56
+ actions: 'setUserInfo',
57
+ },
58
+ onError: { target: 'fail' },
59
+ },
60
+ },
61
+ checkingAutoVerification: {
62
+ always: [{ target: 'verified', cond: 'isVerified' }, { target: 'fail' }],
63
+ },
51
64
  notVerified: {
52
65
  initial: 'checkingStatus',
53
66
  states: {
54
67
  checkingStatus: {
55
68
  invoke: {
56
69
  src: 'verify',
57
- onDone: {
58
- target: 'otp',
59
- actions: 'setVerificationData',
60
- },
70
+ onDone: [
71
+ { target: '#auth_otp.autoVerifying', cond: 'doesNotNeedAcknowledge' },
72
+ { target: 'otp', actions: 'setVerificationData' },
73
+ ],
61
74
  onError: {
62
75
  target: 'errorChecking',
63
76
  actions: 'setError',
@@ -86,20 +99,20 @@ export default function (request) {
86
99
  sendingPhone: {
87
100
  invoke: {
88
101
  src: 'sendPhone',
89
- onDone: {
90
- target: 'otp',
91
- actions: 'setVerificationData',
92
- },
102
+ onDone: [
103
+ { target: '#auth_otp.autoVerifying', cond: 'doesNotNeedAcknowledge' },
104
+ { target: 'otp', actions: 'setVerificationData' },
105
+ ],
93
106
  onError: { target: 'phone' },
94
107
  },
95
108
  },
96
109
  sendingEmail: {
97
110
  invoke: {
98
111
  src: 'sendEmail',
99
- onDone: {
100
- target: 'otp',
101
- actions: 'setVerificationData',
102
- },
112
+ onDone: [
113
+ { target: '#auth_otp.autoVerifying', cond: 'doesNotNeedAcknowledge' },
114
+ { target: 'otp', actions: 'setVerificationData' },
115
+ ],
103
116
  onError: { target: 'email' },
104
117
  },
105
118
  },
@@ -129,9 +142,6 @@ export default function (request) {
129
142
  RESET_OTP: {
130
143
  target: 'reset',
131
144
  },
132
- RESEND_PHONE: {
133
- target: '#auth_otp.notVerified.phone',
134
- },
135
145
  },
136
146
  },
137
147
  acknowledging: {
@@ -216,10 +226,11 @@ export default function (request) {
216
226
  }),
217
227
  },
218
228
  guards: {
229
+ doesNotNeedAcknowledge: (context, event) => event.data?.needAcknowledge === false,
219
230
  isVerified: (context, event) => {
220
231
  const { strategy, userInfo } = context
221
- if (strategy === 'phone') return !!userInfo?.phone_verification_status
222
- if (strategy === 'email') return !!userInfo?.email_verification_status
232
+ if (strategy === 'phone') return !!(userInfo?.phone || userInfo?.tel) && !!userInfo?.phone_verification_status
233
+ if (strategy === 'email') return !!userInfo?.email && !!userInfo?.email_verification_status
223
234
  return false
224
235
  },
225
236
  isNotVerified: (context, event) => {
@@ -231,11 +242,11 @@ export default function (request) {
231
242
  },
232
243
  isPhoneNotVerified: (context, event) => {
233
244
  const { strategy, userInfo } = context
234
- return strategy === 'phone' && !!userInfo && !userInfo.phone_verification_status && !userInfo.phone
245
+ return strategy === 'phone' && !!userInfo && !(userInfo.phone || userInfo.tel)
235
246
  },
236
247
  isEmailNotVerified: (context, event) => {
237
248
  const { strategy, userInfo } = context
238
- return strategy === 'email' && !!userInfo && !userInfo.email_verification_status && !userInfo.email
249
+ return strategy === 'email' && !!userInfo && !userInfo.email
239
250
  },
240
251
  hasNoPhone: (context, event) => {
241
252
  const { error } = context
@@ -34,8 +34,6 @@ export default function (request) {
34
34
  broadcastList: null,
35
35
  mailBoxInfo: null,
36
36
  promotions: [],
37
- normalBroadcast: null,
38
- sentNormalBroadcastList: [],
39
37
  affiliateCode: null,
40
38
  defaultAffiliateCode: null,
41
39
  friendCode: null,
@@ -159,39 +157,6 @@ export default function (request) {
159
157
  },
160
158
  },
161
159
  },
162
- broadcast: {
163
- initial: 'idle',
164
- states: {
165
- idle: {
166
- on: {
167
- START_BROADCAST: {
168
- target: 'picking',
169
- },
170
- },
171
- },
172
- picking: {
173
- after: {
174
- 5000: {
175
- target: 'display',
176
- actions: 'setBroadcast',
177
- },
178
- },
179
- },
180
- display: {
181
- after: {
182
- 5000: {
183
- target: 'picking',
184
- },
185
- },
186
- },
187
- },
188
- on: {
189
- RESET_BROADCAST: {
190
- target: '.idle',
191
- actions: 'resetBroadcast',
192
- },
193
- },
194
- },
195
160
  },
196
161
  },
197
162
  {
@@ -306,26 +271,6 @@ export default function (request) {
306
271
  }
307
272
  return { broadcastList, mailBoxInfo }
308
273
  }),
309
- setBroadcast: assign((context, event) => {
310
- const { broadcastList, sentNormalBroadcastList, normalBroadcast } = context
311
- let sentNormalList = sentNormalBroadcastList
312
- if (normalBroadcast) {
313
- sentNormalList = [...sentNormalBroadcastList, normalBroadcast]
314
- }
315
- const nextNormalBroadcast = broadcastList?.broadcasts?.find((broadcast) => {
316
- return broadcast.type === '0' && !sentNormalList.some((item) => item.broadcast_id === broadcast.broadcast_id)
317
- })
318
- return {
319
- normalBroadcast: nextNormalBroadcast,
320
- sentNormalBroadcastList: sentNormalList,
321
- }
322
- }),
323
- resetBroadcast: assign((context, event) => {
324
- return {
325
- normalBroadcast: null,
326
- sentNormalBroadcastList: [],
327
- }
328
- }),
329
274
  resetByEnterGame: assign((context, event) => {
330
275
  return {
331
276
  isPlaying: true,
@@ -1,49 +1,21 @@
1
- import manual_vn from './manual_vn.js'
2
- import loadcard_vn from './loadcard_vn.js'
3
- import qrcode_v2 from './qrcode_v2.js'
4
- import deposit_fc from './deposit_fc.js'
5
- import direct from './direct.js'
6
- import amb from './amb.js'
7
- import float from './float.js'
8
- import vpay from './vpay.js'
9
- import krway from './krway.js'
10
- import usdt from './usdt.js'
11
1
  import manual_cash from './manual_cash.js'
12
2
  import qrcode_cash from './qrcode_cash.js'
13
3
  import usdt_cash from './usdt_cash.js'
14
4
  import direct_cash from './direct_cash.js'
15
5
  import loadcard_cash from './loadcard_cash.js'
16
- import crypto_bank from './crypto_bank.js'
17
- import crypto_qrcode from './crypto_qrcode.js'
18
- import crypto_way from './crypto_way.js'
19
6
  import crypto_bank_cash from './crypto_bank_cash.js'
20
7
  import crypto_qrcode_cash from './crypto_qrcode_cash.js'
21
8
  import crypto_way_cash from './crypto_way_cash.js'
22
- import virtual_bank_vn from './virtual_bank_vn.js'
23
9
  import virtual_bank_cash from './virtual_bank_cash.js'
24
10
 
25
11
  export default {
26
- manual_vn,
27
- loadcard_vn,
28
- qrcode_v2,
29
- deposit_fc,
30
- direct,
31
- amb,
32
- float,
33
- vpay,
34
- usdt,
35
- krway,
36
12
  manual_cash,
37
13
  qrcode_cash,
38
14
  usdt_cash,
39
15
  direct_cash,
40
16
  loadcard_cash,
41
- crypto_bank,
42
- crypto_qrcode,
43
- crypto_way,
44
17
  crypto_bank_cash,
45
18
  crypto_qrcode_cash,
46
19
  crypto_way_cash,
47
- virtual_bank_vn,
48
20
  virtual_bank_cash,
49
21
  }
@@ -88,9 +88,6 @@ export default function (request, context) {
88
88
  INPUT_USER_ACCOUNT_BRANCH_NAME: {
89
89
  actions: 'setUserAccountBranchName',
90
90
  },
91
- INPUT_USER_ACCOUNT_BRANCH_CODE: {
92
- actions: 'setUserAccountBranchCode',
93
- },
94
91
  INPUT_USER_ACCOUNT_NUMBER: {
95
92
  actions: 'setUserAccountNumber',
96
93
  },
@@ -240,11 +237,6 @@ export default function (request, context) {
240
237
  userAccountBranchName: event.data,
241
238
  }
242
239
  }),
243
- setUserAccountBranchCode: assign((context, event) => {
244
- return {
245
- userAccountBranchCode: event.data,
246
- }
247
- }),
248
240
  setUserAccountNumber: assign((context, event) => {
249
241
  return {
250
242
  userAccountNumber: event.data,
@@ -24,13 +24,7 @@ export default function (request, context) {
24
24
  },
25
25
  },
26
26
  },
27
- idle: {
28
- // on: {
29
- // SET_GAME_CODE: {
30
- // actions: 'setGameCode',
31
- // },
32
- // },
33
- },
27
+ idle: {},
34
28
  },
35
29
  },
36
30
  {
@@ -40,11 +34,6 @@ export default function (request, context) {
40
34
  gameInfo: event.data.data,
41
35
  }
42
36
  }),
43
- // setGameCode: assign((context, event) => {
44
- // return {
45
- // gameCode: event.data.data,
46
- // }
47
- // }),
48
37
  },
49
38
  services: {
50
39
  // 取得遊戲資訊