@jetthai/cuora 1.1.475 → 1.1.476-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.
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 +68 -58
  4. package/.husky/post-checkout +3 -3
  5. package/.husky/pre-push +1 -1
  6. package/.prettierignore +2 -1
  7. package/AGENTS.md +69 -59
  8. package/AI_PROMPT_SOURCE.md +69 -59
  9. package/CHANGELOG.md +279 -5
  10. package/CLAUDE.md +69 -59
  11. package/GEMINI.md +69 -59
  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 +0 -37
  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 +12 -0
  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 +37 -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 +0 -28
  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
package/src/api/user.js CHANGED
@@ -1,26 +1,16 @@
1
- export const PASSWORD_RESET_INIT = 'otp-verifying'
2
- export const PASSWORD_RESET_ALLOW = 'allow-change-password'
3
-
4
1
  export default {
5
2
  checkDt: () => ({ url: 'checkDt', method: 'get' }),
6
3
  updateDt: (data) => ({ url: 'updateDt', method: 'post', params: data }),
7
4
  getUserInfo: () => ({ url: 'self', method: 'get' }),
8
5
  updateUserInfo: (data) => ({ url: 'self', method: 'post', params: data }),
9
6
  changePassword: (data) => ({ url: 'settings/password', method: 'post', params: data }),
10
- setPreference: ({ defaultCategory }) => ({ url: 'settings/preference', method: 'post', params: { defaultCategory } }),
11
7
  resetOtp: ({ requestId, number }) => ({ url: 'reset', method: 'post', params: { requestId, number } }),
12
- getAffiliate: () => ({ url: 'affiliate', method: 'get' }),
13
- getAffiliateHome: () => ({ url: 'affiliate/home', method: 'get' }),
14
- getAffiliateDashboard: () => ({ url: 'affiliate/dashboard', method: 'get' }),
15
- getAffiliateDashboardList: ({ level, page, row }) => ({ url: 'affiliate/dashboard/list', method: 'post', params: { level, page, row } }),
16
- postAffiliate: ({ affiliateCode }) => ({ url: 'affiliate', method: 'post', params: { affiliateCode } }),
17
8
  getFriends: () => ({ url: 'friends', method: 'get' }),
18
9
  getFriendsHome: () => ({ url: 'friends/home', method: 'get' }),
19
10
  getFriendsDashboard: () => ({ url: 'friends/dashboard', method: 'get' }),
20
11
  getFriendsDashboardList: ({ level, page, row }) => ({ url: 'friends/dashboard/list', method: 'post', params: { level, page, row } }),
21
12
  getFriendsList: ({ type, page, row }) => ({ url: 'friends/reward-list', method: 'post', params: { type, page, row } }),
22
13
  postFriends: ({ friendCode }) => ({ url: 'friends', method: 'post', params: { friendCode } }),
23
- passwordRecovery: (recoveryData) => ({ url: 'recovery', method: 'post', params: recoveryData, isPublic: true }),
24
14
  // passwordAbandon: ({ number }) => ({ url: 'recovery/abandon', method: 'post', params: { number }, isPublic: true }), 平台版和現金網未使用
25
15
  // passwordAcknowledge: (acknowledgeData) => ({ url: 'recovery/acknowledge', method: 'post', params: acknowledgeData, isPublic: true }), 平台版和現金網未使用
26
16
  verify: () => ({ url: 'verify', method: 'post' }),
@@ -50,12 +40,6 @@ export default {
50
40
  params: { requestId, target, newPassword, appSecret },
51
41
  isPublic: true,
52
42
  }),
53
- verifyV2Initiate: ({ strategy }) => ({
54
- // strategy: 'phone' | 'email'
55
- url: '/verify/v2/initiate',
56
- method: 'post',
57
- params: { strategy },
58
- }),
59
43
  otpAcknowledge: ({ requestId, target, code }) => ({
60
44
  url: '/otpsso/acknowledge',
61
45
  method: 'post',
package/src/index.js CHANGED
@@ -2,6 +2,6 @@ import api from './api/index.js'
2
2
  import machine from './machine/index.js'
3
3
  import Request from './request/request.js'
4
4
  import Config from './request/config.js'
5
- import util, { constant, storage, paramStore } from './util/index.js'
5
+ import { constant, storage, paramStore } from './util/index.js'
6
6
 
7
- export { api, machine, Request, Config, util, constant, storage, paramStore }
7
+ export { api, machine, Request, Config, constant, storage, paramStore }
@@ -101,6 +101,7 @@ export default function (request) {
101
101
  }
102
102
  }),
103
103
  setProgressSummary: assign((context, event) => {
104
+ if (!event.data) return {}
104
105
  const { progressSummary } = event.data
105
106
  return {
106
107
  progressSummary: progressSummary || null,
@@ -184,6 +185,12 @@ export default function (request) {
184
185
  hasToken ? request.send(payment.getPromotionsList()) : [],
185
186
  ])
186
187
 
188
+ // send() 不保證回傳 { data } 信封(200 但 body 非 JSON 時回字串,data 即為 undefined)。非陣列必須在 service 內 reject 走 onError,
189
+ // 不可進入 setActivityList:assign 內拋錯會讓 interpreter 清空事件佇列,machine 永久停在 fetchingList、輪詢中止
190
+ if (!Array.isArray(data)) {
191
+ throw new Error('[activity_cash] fetchList: activityList is not an array')
192
+ }
193
+
187
194
  return {
188
195
  activityList: data,
189
196
  promotionList,
@@ -210,6 +217,11 @@ export default function (request) {
210
217
  ),
211
218
  isProgressEnable ? request.send(activity.getProgressSummary({ appSecret })).catch(() => null) : Promise.resolve(null),
212
219
  ])
220
+ // ERR_800/維護中時 send() 回 undefined,進到 setActivityDetailList 讀 item.data 會在 assign 內拋錯而卡死 machine;
221
+ // 整輪 reject 走 onError,保留上一輪明細並於下個 TIMEOUT 重試
222
+ if (!activityDetailList.every((res) => res !== null && typeof res === 'object')) {
223
+ throw new Error('[activity_cash] fetchActivityDetailList: invalid detail response')
224
+ }
213
225
 
214
226
  return {
215
227
  activityDetailList,
@@ -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,45 +78,56 @@ export default function (request) {
79
78
  },
80
79
  },
81
80
  },
82
- authenticationGuest: {
81
+ authenticated: {
83
82
  invoke: {
84
- src: 'authenticateGuest',
83
+ src: 'fetchUserInfo',
85
84
  onDone: {
86
- target: 'authenticated',
87
- actions: 'setToken',
85
+ target: 'otpChecking',
86
+ actions: ['setUserInfo', 'extendToken'],
88
87
  },
89
88
  onError: {
90
- target: 'idle',
91
- actions: 'removeToken',
89
+ target: 'leaving',
92
90
  },
93
91
  },
94
92
  },
95
- authenticationApp: {
96
- invoke: {
97
- src: 'authenticateApp',
98
- onDone: {
99
- target: 'authenticated',
100
- actions: ['setToken'],
93
+ otpChecking: {
94
+ initial: 'pending',
95
+ states: {
96
+ pending: {
97
+ after: {
98
+ TIMEOUT: {
99
+ target: 'fetching',
100
+ },
101
+ },
101
102
  },
102
- onError: {
103
- target: 'idle',
104
- actions: 'removeToken',
103
+ fetching: {
104
+ invoke: {
105
+ src: 'fetchUserInfo',
106
+ onDone: {
107
+ target: 'pending',
108
+ actions: ['setUserInfo', 'extendToken'],
109
+ },
110
+ onError: {
111
+ target: 'pending',
112
+ },
113
+ },
105
114
  },
106
115
  },
107
- },
108
- authenticated: {
109
- invoke: {
110
- src: 'fetchUserInfo',
111
- onDone: {
112
- target: 'otpChecking',
113
- actions: ['setUserInfo', 'extendToken'],
116
+ on: {
117
+ OTP_VERIFIED: {
118
+ target: 'bindBankChecking',
114
119
  },
115
- onError: {
120
+ OTP_SKIP: {
121
+ target: 'bindBankChecking',
122
+ },
123
+ LOGOUT: {
116
124
  target: 'leaving',
117
125
  },
118
126
  },
119
127
  },
120
- otpChecking: {
128
+ // 綁銀行與 OTP 同為登入完成前的關卡:放在 loginSuccess 之前,登入後的副作用(公告、活動彈窗等)
129
+ // 才不會在綁定窗開著時觸發。是否需要綁定由前端依 siteConfig 判斷,machine 只負責等待結果。
130
+ bindBankChecking: {
121
131
  initial: 'pending',
122
132
  states: {
123
133
  pending: {
@@ -141,10 +151,10 @@ export default function (request) {
141
151
  },
142
152
  },
143
153
  on: {
144
- OTP_VERIFIED: {
154
+ BIND_BANK_DONE: {
145
155
  target: 'loginSuccess',
146
156
  },
147
- OTP_SKIP: {
157
+ BIND_BANK_SKIP: {
148
158
  target: 'loginSuccess',
149
159
  },
150
160
  LOGOUT: {
@@ -292,9 +302,6 @@ export default function (request) {
292
302
  CLEAR: {
293
303
  target: '.logout',
294
304
  },
295
- LOGIN_GUEST: {
296
- target: '.authenticationGuest',
297
- },
298
305
  LOGIN_ID: {
299
306
  target: '.authentication',
300
307
  actions: ['setReCaptchaToken', 'setLoginId'],
@@ -307,16 +314,9 @@ export default function (request) {
307
314
  target: '.authentication',
308
315
  actions: ['setReCaptchaToken', 'setLoginEmail'],
309
316
  },
310
- LOGIN_LOCAL: {
311
- target: '.authentication',
312
- actions: 'setLoginLocal',
313
- },
314
317
  LOGIN_3PARTY: {
315
318
  actions: 'redirectTo3Party',
316
319
  },
317
- LOGIN_APP: {
318
- target: '.authenticationApp',
319
- },
320
320
  LOGIN_TELEGRAM: {
321
321
  target: '.authentication',
322
322
  actions: 'setLoginTelegram',
@@ -402,20 +402,6 @@ export default function (request) {
402
402
  },
403
403
  }
404
404
  }),
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
405
  setLoginTelegram: assign((context, event) => {
420
406
  const { loginType, additionalUserInfo, isSignature, idToken } = event.data
421
407
  return {
@@ -569,19 +555,11 @@ export default function (request) {
569
555
  }),
570
556
  },
571
557
  services: {
572
- authenticateApp: async (context, event) => {
573
- const { token } = await request.send(auth.loginApp(event.data))
574
- return token
575
- },
576
558
  authenticate: async (context, event) => {
577
559
  const data = { ...context.loginData, reCaptchaToken: context.reCaptchaToken }
578
560
  const { token } = await request.send(auth.login(data))
579
561
  return token
580
562
  },
581
- authenticateGuest: async (context, event) => {
582
- const { token } = await request.send(auth.guestLogin())
583
- return token
584
- },
585
563
  logout: async (context, event) => {
586
564
  return await request.send(auth.logout())
587
565
  },
@@ -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
  // 取得遊戲資訊