@jetthai/cuora 1.1.479 → 1.1.481-api.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.
- package/.github/copilot-instructions.md +64 -57
- package/AGENTS.md +65 -58
- package/AI_PROMPT_SOURCE.md +65 -58
- package/CHANGELOG.md +35 -0
- package/CLAUDE.md +65 -58
- package/GEMINI.md +65 -58
- package/README.md +11 -12
- package/package.json +1 -1
- package/src/api/account.js +0 -1
- package/src/api/activity.js +0 -37
- package/src/api/auth.js +0 -31
- package/src/api/game.js +0 -10
- package/src/api/payment.js +0 -51
- package/src/api/user.js +0 -16
- package/src/index.js +2 -2
- package/src/machine/activity/diamond_shop_activity_cash.js +0 -1
- package/src/machine/activity/fafafa_activity.js +0 -10
- package/src/machine/activity/index.js +0 -12
- package/src/machine/auth.js +38 -60
- package/src/machine/auth_otp_v3.js +0 -3
- package/src/machine/common.js +0 -55
- package/src/machine/deposit/index.js +0 -28
- package/src/machine/deposit/manual_cash.js +0 -8
- package/src/machine/game_info.js +1 -12
- package/src/machine/game_v2_1.js +1 -89
- package/src/machine/inbox.js +0 -12
- package/src/machine/index.js +0 -32
- package/src/machine/reward_cash.js +0 -39
- package/src/machine/user_reset_password.js +0 -13
- package/src/machine/websocket.js +0 -4
- package/src/machine/withdraw/index.js +0 -6
- package/src/request/request.js +68 -29
- package/src/util/constant.js +0 -1
- package/src/util/index.js +1 -4
- package/src/machine/activity/activity.js +0 -209
- package/src/machine/activity/diamond_shop_activity_fc.js +0 -196
- package/src/machine/activity/diamond_shop_activity_vn.js +0 -178
- package/src/machine/activity/invite_friends_activity.js +0 -114
- package/src/machine/activity/mini_game_activity.js +0 -68
- package/src/machine/activity/return_bonus_activity.js +0 -153
- package/src/machine/auth_otp_v2.js +0 -177
- package/src/machine/bank_binding_amb.js +0 -146
- package/src/machine/bonus.js +0 -76
- package/src/machine/deposit/amb.js +0 -93
- package/src/machine/deposit/crypto_bank.js +0 -330
- package/src/machine/deposit/crypto_qrcode.js +0 -148
- package/src/machine/deposit/crypto_way.js +0 -252
- package/src/machine/deposit/deposit_fc.js +0 -272
- package/src/machine/deposit/direct.js +0 -310
- package/src/machine/deposit/float.js +0 -375
- package/src/machine/deposit/krway.js +0 -151
- package/src/machine/deposit/loadcard_vn.js +0 -351
- package/src/machine/deposit/manual_vn.js +0 -458
- package/src/machine/deposit/qrcode_v2.js +0 -338
- package/src/machine/deposit/usdt.js +0 -144
- package/src/machine/deposit/virtual_bank_vn.js +0 -269
- package/src/machine/deposit/vpay.js +0 -368
- package/src/machine/game_hot_new.js +0 -79
- package/src/machine/game_replay.js +0 -46
- package/src/machine/game_search_v2.js +0 -401
- package/src/machine/honor_board.js +0 -132
- package/src/machine/merge.js +0 -57
- package/src/machine/payment_data.js +0 -86
- package/src/machine/promotions.js +0 -170
- package/src/machine/reward.js +0 -255
- package/src/machine/reward_fc.js +0 -98
- package/src/machine/side.js +0 -154
- package/src/machine/side_v2.js +0 -211
- package/src/machine/vip_table.js +0 -57
- package/src/machine/welcome.js +0 -110
- package/src/machine/withdraw/withdraw_crypto_cash.js +0 -327
- package/src/machine/withdraw/withdraw_krway.js +0 -223
- package/src/machine/withdraw/withdraw_manual.js +0 -536
- package/src/util/math.js +0 -4
package/GEMINI.md
CHANGED
|
@@ -99,7 +99,9 @@ state machine service → request.send(api.xxx(params)) → Request class → AP
|
|
|
99
99
|
| Request | `src/request/` | Token injection, V1→V2 path conversion, maintenance-mode detection, custom serialization, request cancellation |
|
|
100
100
|
| API | `src/api/` | Each function returns a **request descriptor object** (it does not send the request) |
|
|
101
101
|
| Machine | `src/machine/` | XState v4 state machines, factory pattern receiving `request` |
|
|
102
|
-
| Util | `src/util/` | storage (with `maxAge` TTL),
|
|
102
|
+
| Util | `src/util/` | storage (with `maxAge` TTL), constant, err998SentryExtra |
|
|
103
|
+
|
|
104
|
+
> **deviceToken does not live in this package**: `auth.js` / `user_sign_up.js` obtain the device token by calling `request.config.getDt?.()` — the implementation is injected by the downstream frontend when it constructs `request`; this package only calls it. Whether it is called is decided by `siteConfig.dtVerify` (login flow) or the `deviceTokenEnable` context (registration flow); when nothing is injected, `?.()` returns `undefined` instead of throwing.
|
|
103
105
|
|
|
104
106
|
**API descriptor object structure**:
|
|
105
107
|
|
|
@@ -179,52 +181,49 @@ Token 5min TTL → fetchUserInfo success → extendToken resets TTL → poll aga
|
|
|
179
181
|
|
|
180
182
|
**Polling interval**: base `tick: 2000ms`, **multiplied by 5 while in a game** (becoming 10 seconds) to reduce server load during play.
|
|
181
183
|
|
|
182
|
-
**Login method routing** (
|
|
184
|
+
**Login method routing** (5 kinds; `LOGIN_TOKEN` additionally follows the token recovery path described above):
|
|
183
185
|
|
|
184
186
|
| Event | Method | Special Handling |
|
|
185
187
|
| ---------------- | -------------------- | --------------------------------------------------------------- |
|
|
186
188
|
| `LOGIN_ID` | Account + password | reCAPTCHA header |
|
|
187
189
|
| `LOGIN_PHONE` | Phone number | reCAPTCHA header + country code |
|
|
188
190
|
| `LOGIN_EMAIL` | Email | reCAPTCHA header |
|
|
189
|
-
| `LOGIN_LOCAL` | Local account | Additionally stores `cuora_tempuser` (24h TTL) |
|
|
190
|
-
| `LOGIN_GUEST` | Guest | No auth credentials |
|
|
191
|
-
| `LOGIN_APP` | OAuth App | provider + accessToken |
|
|
192
191
|
| `LOGIN_TELEGRAM` | Telegram | additionalUserInfo |
|
|
193
192
|
| `LOGIN_3PARTY` | Third-party redirect | **Does not switch state**; uses `window.location.href` directly |
|
|
194
193
|
|
|
195
|
-
**OTP flow**: after a successful login it enters `otpChecking`, and only proceeds to `loginSuccess`
|
|
194
|
+
**OTP / bind-bank flow**: after a successful login it enters `otpChecking`; `OTP_VERIFIED` or `OTP_SKIP` moves it to `bindBankChecking`, and only `BIND_BANK_DONE` or `BIND_BANK_SKIP` proceeds to `loginSuccess` (either gate accepts `LOGOUT` to abort). Whether binding is required is decided by the downstream frontend; the machine only waits — **downstream must send one of these events in `bindBankChecking`, or the session stalls there**. The `tokenAuthenticated` path skips both gates.
|
|
196
195
|
|
|
197
196
|
**Account persistence**: the most recently used login account is stored in localStorage (31-day TTL) for form auto-fill. **Token expiration does not affect the account record.** However, `pruneRememberedAccounts`, which runs after `fetchSiteConfig` succeeds, **compares against `siteConfig.loginMethods` and clears the leftover account for any disabled login method** (`phone` clears the country code along with it) — fetching configuration, an apparently read-only action, carries the side effect of deleting from localStorage. The purpose is to prevent downstream frontends from back-filling a stale value into an input whose type has since changed after the backend disables a login method. When `loginMethods` is missing entirely, nothing is cleared, to avoid wiping everything by mistake.
|
|
198
197
|
|
|
199
198
|
### 2.2 Canonical Deposit Pattern
|
|
200
199
|
|
|
201
|
-
All deposit state machines follow a unified core flow, with variants per payment method:
|
|
200
|
+
Every machine currently under `src/machine/deposit/` is cash-site specific (`*_cash.js`); **the Non-Cash versions no longer live in this package**. All deposit state machines follow a unified core flow, with variants per payment method:
|
|
202
201
|
|
|
203
202
|
```
|
|
204
|
-
loading (
|
|
205
|
-
→
|
|
206
|
-
→
|
|
207
|
-
→
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
→ submitting → submitted
|
|
203
|
+
loading (always + setInitData: takes paymentDetail from the factory context parameter and filters this category's payment methods)
|
|
204
|
+
→ checking (invoke to fetch secondary data such as bank/network lists)
|
|
205
|
+
→ debouncing (entry clears calculation, after 1000ms debounce)
|
|
206
|
+
→ calculating (calls getDepositExpectedResult) → calculated (shows the calculation result)
|
|
207
|
+
→ loaded (the resting state when calculation isn't possible, waiting for the user to complete the options)
|
|
208
|
+
→ submitting → submitted
|
|
211
209
|
```
|
|
212
210
|
|
|
213
|
-
**
|
|
211
|
+
**Structural traits shared by the Cash machines** (differing from ordinary state machines — easy to trip on):
|
|
212
|
+
|
|
213
|
+
| Aspect | Convention |
|
|
214
|
+
| ------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
215
|
+
| Constructor | `(request, context) => createMachine()` — initial data is **preloaded by the caller**, not fetched by the machine |
|
|
216
|
+
| loading phase | `always` transitions immediately, with no async request |
|
|
217
|
+
| Global events | `internal: false` (forces external transitions, ensuring entry/exit re-run) |
|
|
218
|
+
| Debounce | `debouncing` uses `after: { 1000 }` + `cond`, not a separate CALCULATE event |
|
|
214
219
|
|
|
215
|
-
|
|
216
|
-
| ------------- | ---------------------------------------- | ----------------------------------------------- |
|
|
217
|
-
| Constructor | `(request) => createMachine()` | `(request, context) => createMachine()` |
|
|
218
|
-
| Initial data | Fetched asynchronously (init → fetching) | Preloaded via the context parameter |
|
|
219
|
-
| loading phase | Two sub-states (init + fetching) | `always` jumps straight to checking |
|
|
220
|
-
| Global events | `internal: true` (default) | `internal: false` (forces external transitions) |
|
|
221
|
-
| Bank list | Re-fetched every time | `bankMap` cache (keyed by method) |
|
|
220
|
+
**Promotion**: the `SET_PROMOTION` global event sets the promotion context; most machines pair it with an `isPromotionChanged` guard to avoid re-running on an identical value. `direct_cash.js` additionally has `bankMap`, caching bank lists keyed by method.
|
|
222
221
|
|
|
223
|
-
|
|
222
|
+
> ⚠️ **`promotionsNo` vs `activityNo` (easy to trip on)**: the **deposit** flow's promotion always uses `promotion?.promotionsNo` (all 7 deposit machines and `api/payment.js` do); the **activity system** uses `activityNo`. They are different fields and are not interchangeable.
|
|
224
223
|
|
|
225
|
-
>
|
|
224
|
+
> ℹ️ `getBonusPreview` in `api/payment.js` (whose parameter is `promotionsNo`) currently has **no machine calling it**, and `siteConfig.bonusPreviewEnable` is no longer referenced anywhere in this package. Wiring bonus preview back up has to be done by hand.
|
|
226
225
|
|
|
227
|
-
**resultMap cache** (`
|
|
226
|
+
**resultMap cache** (`usdt_cash.js`): caches keyed by `selectedNetwork.value` to avoid re-fetching the same network address.
|
|
228
227
|
|
|
229
228
|
> ⚠️ **V2 API response format is inconsistent**: the same endpoint may return `{ data: {...} }` or just `{...}`, so every machine needs defensive handling:
|
|
230
229
|
>
|
|
@@ -237,26 +236,36 @@ loading (fetch siteConfig + bankList in parallel)
|
|
|
237
236
|
>
|
|
238
237
|
> This pattern assumes `event.data` is always an object; `send()` may resolve `undefined`, and destructuring it inside an assign throws and stalls the machine (see item 13 of 2.9).
|
|
239
238
|
|
|
240
|
-
**processing state check**: `
|
|
239
|
+
**processing state check**: `manual_cash.js` and `virtual_bank_cash.js` use an `isProcessing` guard to check whether there is an in-progress deposit order, and if so jump straight to `submitted` to prevent duplicate submission.
|
|
241
240
|
|
|
242
241
|
### 2.3 Withdrawal Flow & OTP
|
|
243
242
|
|
|
244
|
-
|
|
243
|
+
`src/machine/withdraw/` contains only one machine, `withdraw_manual_cash.js`. Main flow:
|
|
245
244
|
|
|
246
245
|
```
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
246
|
+
loading (fetchInitData: double-wallet rule gate + getBindingPaymentInfo + getPendingOrder)
|
|
247
|
+
→ checking (always: isProcessing → submitted, otherwise loaded)
|
|
248
|
+
→ loaded ──SET_AMOUNT──▶ debouncing (always: isSubmittable → calculated, otherwise back to loaded)
|
|
249
|
+
→ calculated → submitting / submitting_crypto
|
|
250
|
+
→ isOtpRequired → otp (parallel state)
|
|
251
|
+
→ otherwise → submitted
|
|
253
252
|
```
|
|
254
253
|
|
|
255
|
-
|
|
254
|
+
There are only 4 guards: `hasNoBank` (`REFRESH` only reloads when no account is bound), `isProcessing`, `isSubmittable` (amount > 0 and within `currentPayment.minimum`–`maximum`), and `isOtpRequired`. `userBanks` is `bankList` + `ewalletList` + `cryptoList` flattened together, with the first entry selected by default.
|
|
255
|
+
|
|
256
|
+
**Double-wallet withdrawal rule gate** (`doubleWalletWithdrawLimitCheck` — the least intuitive part; the point is to save API calls):
|
|
257
|
+
|
|
258
|
+
| Value | Behavior |
|
|
259
|
+
| ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
260
|
+
| `'0'` | Fetch only the CASH `withdrawRule` |
|
|
261
|
+
| `'1'` | Fetch only the ACTIVITY `withdrawRule`; regardless of whether it qualifies, the CASH rule takes no part in the gate |
|
|
262
|
+
| `'2'` | Fetch ACTIVITY first; if **not withdrawable**, adopt it directly (skipping CASH); only when it **qualifies** does it go on to fetch CASH as the basis |
|
|
263
|
+
|
|
264
|
+
`enableWithdraw` deliberately uses a truthy comparison (`!activityRule?.enableWithdraw`) to align with client-pwa-ssr, avoiding misjudgment when the backend returns a non-boolean truthy value such as `1`.
|
|
256
265
|
|
|
257
|
-
**
|
|
266
|
+
**OTP parallel states**: `isOtpRequired` **only looks at whether the response contains `request_id`** (`number` / `email` are used purely for display). Once entered, the `countdown` and `verification` sub-states run **in parallel**, so the countdown does not block verification actions. Within `verification`, `idle` can branch to `acknowledging` (on success, exits OTP to the top-level `submitted`) or `reset` (resend; on success, returns to `idle` with a new `requestId`/`ttl`); the `BACK` event returns directly to the top-level `calculated`. `ttl` is in **milliseconds**, and `decreaseTtl` applies `Math.max(ttl - 1000, 0)` every second.
|
|
258
267
|
|
|
259
|
-
|
|
268
|
+
> ℹ️ `restore` in `api/payment.js` (bonus / free-credit redemption) currently has **no machine calling it**.
|
|
260
269
|
|
|
261
270
|
### 2.4 Game Management
|
|
262
271
|
|
|
@@ -272,11 +281,11 @@ loading (fetch siteConfig + bankList in parallel)
|
|
|
272
281
|
|
|
273
282
|
**receiveStatus enum**: `0` in progress / not yet eligible (→ `progress_status`), `1` claimed (→ `received`, terminal), `2` claimable (→ `receiveable`).
|
|
274
283
|
|
|
275
|
-
**Red-dot unread state
|
|
284
|
+
**Red-dot unread state** (`activity_cash.js`):
|
|
276
285
|
|
|
277
|
-
- `
|
|
278
|
-
- For other activities the read state is stored in localStorage under the key `unread_${activityNo}_${uidSite}`
|
|
286
|
+
- The read state is stored in localStorage under the key `unread_${activityNo}_${uidSite}`; **when the key is absent, `unread` defaults to `true`** (a new activity always shows a red dot)
|
|
279
287
|
- Whenever `activityList` is updated, **clone the whole array** to avoid direct mutation
|
|
288
|
+
- The old `noRedActivity` type allowlist **no longer exists**; today every activity type is treated the same
|
|
280
289
|
|
|
281
290
|
**Activity polling**: base interval `tick * 10 = 20 seconds`; **polling pauses while in a game (`isPlaying === true`)**. Fetching promotions additionally requires `hasToken`.
|
|
282
291
|
|
|
@@ -308,10 +317,9 @@ io(`${socketURL}/frontend`, {
|
|
|
308
317
|
|
|
309
318
|
### 2.7 Configuration & Live Info (Common Machine)
|
|
310
319
|
|
|
311
|
-
**
|
|
320
|
+
**3 parallel sub-machines**: `config` (siteConfig + layoutConfig, event-triggered), `feed` (feeds + mailbox + promotions, 20-second polling), and `getAnnouncements` (event-triggered).
|
|
312
321
|
|
|
313
322
|
- **siteConfig decoding**: the response is an encoded string; the `setConfig` action base64-decodes it to obtain the actual configuration (`loginMethods`, `paymentMethods`, `csChat`, etc.). **The downstream frontends' stores do not decode it a second time.**
|
|
314
|
-
- **Broadcast rotation**: `picking` (5s) → `display` (5s) → `picking`, selecting `type === '0'` entries from `broadcastList`; already-shown items are added to `sentNormalBroadcastList` and not repeated
|
|
315
323
|
- **Mailbox filtering**: if `customerMessageEnable === false`, the count of CUSTOMER-type messages is deducted from the mailbox total
|
|
316
324
|
|
|
317
325
|
### 2.8 API Request Lifecycle
|
|
@@ -358,19 +366,19 @@ io(`${socketURL}/frontend`, {
|
|
|
358
366
|
|
|
359
367
|
> Every item below exists in the code in **two competing forms** — exploring the code cannot tell you which one is the standard, so it must be written down explicitly. New code always follows the "Target" column; existing code is not proactively refactored en masse (scope discipline).
|
|
360
368
|
|
|
361
|
-
| Item | Current state
|
|
362
|
-
| ------------------------- |
|
|
363
|
-
| HTTP method casing | `'GET'` and `'get'` coexist (`request.js` calls `toUpperCase()` internally, so behavior is unaffected)
|
|
364
|
-
| Import paths | Some files self-reference via the `@jetthai/cuora` package name
|
|
365
|
-
| lodash extension | `'lodash/pickBy.js'` and `'lodash/pickBy'` coexist
|
|
366
|
-
| URL leading slash | A few APIs carry a leading slash
|
|
367
|
-
| Query parameter placement | A few write them straight into the URL (`register?${qs}`, `mail?include=cl`), bypassing serialization
|
|
368
|
-
| Initial state naming | `idle` / `loading` / `fetching` / `
|
|
369
|
-
| Magic numbers and strings | Activity type IDs, error codes, TTLs, polling ticks, `'DEPOSIT'`/`'WITHDRAW'`, `receiveStatus`, `connectStatus` are scattered around | Centralize in `util/constant.js` (`ERROR_CODES` / `TTL` / `INTERVAL` / `TRANSFER_TYPE` / `RECEIVE_STATUS`) |
|
|
370
|
-
| Error handling | Three forms coexist: silent fallback to `idle` (most common, loses error info), transition to `fail`, infinite retry
|
|
371
|
-
| Parameter naming | e.g. `
|
|
372
|
-
| Parameter validation | The API layer has no validation at all (e.g. `
|
|
373
|
-
| Deprecated APIs |
|
|
369
|
+
| Item | Current state | Target |
|
|
370
|
+
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
371
|
+
| HTTP method casing | `'GET'` and `'get'` coexist (`request.js` calls `toUpperCase()` internally, so behavior is unaffected) | Consistently lowercase `'get'`/`'post'`/`'put'`/`'delete'` |
|
|
372
|
+
| Import paths | Some files self-reference via the `@jetthai/cuora` package name | Consistently relative paths (`'../../api/payment.js'`) |
|
|
373
|
+
| lodash extension | `'lodash/pickBy.js'` and `'lodash/pickBy'` coexist | Consistently **without** the extension |
|
|
374
|
+
| URL leading slash | A few APIs carry a leading slash | Omit it (unless deliberately bypassing `url-join`, in which case comment the reason) |
|
|
375
|
+
| Query parameter placement | A few write them straight into the URL (`register?${qs}`, `mail?include=cl`), bypassing serialization | Always use the `params` field |
|
|
376
|
+
| Initial state naming | `idle`(27) / `loading`(13) / `fetching`(12) / `pending`(6) / `checking` / `init` and others used interchangeably | By semantics: `idle` (awaiting action), `loading` (initial load), `fetching` (re-fetch), `submitting` / `submitted` |
|
|
377
|
+
| Magic numbers and strings | Activity type IDs, error codes, TTLs, polling ticks, `'DEPOSIT'`/`'WITHDRAW'`, `receiveStatus`, `connectStatus` are scattered around; `util/constant.js` currently holds **only** `GAME_SEARCH` / `GAME_TYPE_LIST`, two game-category constants | Centralize in `util/constant.js` (`ERROR_CODES` / `TTL` / `INTERVAL` / `TRANSFER_TYPE` / `RECEIVE_STATUS`) |
|
|
378
|
+
| Error handling | Three forms coexist: silent fallback to `idle` (most common, loses error info), transition to `fail`, infinite retry | `onError` with `actions: 'setError'` to preserve the error in context; distinguish recoverable from unrecoverable; retries must have a cap |
|
|
379
|
+
| Parameter naming | e.g. `getFreeGameReward(code)` is semantically unclear | Concrete names (`gameCode`) |
|
|
380
|
+
| Parameter validation | The API layer has no validation at all (e.g. the dynamic path following `checkDt()` is injected straight into the URL) | Validate at the system boundary: path parameters non-undefined and free of path-traversal characters, amounts positive |
|
|
381
|
+
| Deprecated APIs | `getPaymentInfo` in `api/payment.js` carries a "deprecated" comment but still has callers | Add `@deprecated` first, then remove once confirmed unreferenced |
|
|
374
382
|
|
|
375
383
|
---
|
|
376
384
|
|
|
@@ -382,12 +390,11 @@ io(`${socketURL}/frontend`, {
|
|
|
382
390
|
- **No request caching** — high-frequency endpoints (`fetchUserInfo` every 2–10 seconds, `getConfig` on every state machine initialization, `getPaymentDetail` on every entry to a deposit/withdrawal page, `getActivityList` every 20 seconds) all hit the server directly. Consider TTL caching or `stale-while-revalidate`.
|
|
383
391
|
- **No rate limiting or backoff** — polling runs at a fixed interval and does not change on errors. Consider exponential backoff on errors.
|
|
384
392
|
- **No automatic token refresh** — the response interceptor in `request.js` does not handle 401, so an expired token simply fails.
|
|
385
|
-
- **FingerprintJS bundling** — the FingerprintJS embedded in `src/lib/` is loaded at module initialization even when disabled. Consider switching to a dynamic `import()` for lazy loading.
|
|
386
393
|
- **No code splitting** — `machine/index.js` eagerly imports every state machine + the APIs + Socket.IO + lodash, so importing `machine` loads everything. Consider supporting individual imports to enable tree-shaking.
|
|
387
|
-
- **Timer management** — countdowns are largely implemented with self-referencing `after: { 1000 }` transitions, producing one state transition per second (including a context clone + event dispatch). Consider a callback service + `setInterval`, and **compute elapsed time** rather than decrementing step by step to avoid cumulative drift.
|
|
388
|
-
- **Large state machine files** — `game_v2_1.js
|
|
394
|
+
- **Timer management** — countdowns are largely implemented with self-referencing `after: { 1000 }` transitions (e.g. the OTP `countdown` in `withdraw_manual_cash.js`), producing one state transition per second (including a context clone + event dispatch). Consider a callback service + `setInterval`, and **compute elapsed time** rather than decrementing step by step to avoid cumulative drift.
|
|
395
|
+
- **Large state machine files** — `game_v2_1.js`(699), `auth.js`(592), `inbox.js`(489), `common.js`(404), `game_search_cash.js`(401), `manual_cash.js`(370), `websocket.js`(357), `withdraw_manual_cash.js`(324), `auth_otp_v3.js`(307), and `crypto_bank_cash.js`(306) all exceed 300 lines and could be split into composable sub-machines.
|
|
389
396
|
- **Unused context fields** — several state machines declare context fields that are never assigned or read.
|
|
390
|
-
- **lodash
|
|
397
|
+
- **lodash exists for only two functions** — the whole repo has just 5 imports: `pickBy` (`request/request.js`, `api/auth.js`, `machine/auth.js`, `machine/common.js`) and `isEqual` (`activity/fafafa_activity.js`), yet the entire package is listed as a dependency. Both can be replaced with native implementations to drop the dependency; until then, at least unify the extension convention (see "Style Convergence Targets").
|
|
391
398
|
|
|
392
399
|
---
|
|
393
400
|
|
package/README.md
CHANGED
|
@@ -53,20 +53,20 @@ export default {
|
|
|
53
53
|
## Usage
|
|
54
54
|
|
|
55
55
|
```js
|
|
56
|
-
import { api, machine, Request, Config,
|
|
56
|
+
import { api, machine, Request, Config, constant, storage } from '@jetthai/cuora'
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
### 模組匯出
|
|
60
60
|
|
|
61
|
-
| 匯出名稱
|
|
62
|
-
|
|
|
63
|
-
| `api`
|
|
64
|
-
| `machine`
|
|
65
|
-
| `Request`
|
|
66
|
-
| `Config`
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `
|
|
61
|
+
| 匯出名稱 | 說明 |
|
|
62
|
+
| ------------ | ------------------------------------------------------ |
|
|
63
|
+
| `api` | 各領域 API 模組的聚合物件(見下方 API 章節) |
|
|
64
|
+
| `machine` | XState 狀態機工廠函式的聚合物件(見下方 Machine 章節) |
|
|
65
|
+
| `Request` | Axios 封裝類別(攔截器、Token、版本控制) |
|
|
66
|
+
| `Config` | 設定類別(apiURL、clientId、appSecret 等) |
|
|
67
|
+
| `constant` | 遊戲類型常數 |
|
|
68
|
+
| `storage` | localStorage 封裝(支援 TTL/過期) |
|
|
69
|
+
| `paramStore` | ac/fc 追蹤參數的三層解析與雙寫 |
|
|
70
70
|
|
|
71
71
|
### Config
|
|
72
72
|
|
|
@@ -151,7 +151,7 @@ const service = interpret(authMachine).start()
|
|
|
151
151
|
### Utilities
|
|
152
152
|
|
|
153
153
|
```js
|
|
154
|
-
import {
|
|
154
|
+
import { constant, storage } from '@jetthai/cuora'
|
|
155
155
|
|
|
156
156
|
// LocalStorage 封裝,支援 TTL/過期機制
|
|
157
157
|
storage.set('key', value, ttl)
|
|
@@ -159,7 +159,6 @@ storage.get('key')
|
|
|
159
159
|
|
|
160
160
|
// 遊戲類型常數
|
|
161
161
|
constant.GAME_TYPE_LIST // 遊戲類型陣列,每筆為 { typeId, name, gameTypeMappingId }
|
|
162
|
-
constant.MY_FAVORITE // 'MyFavorite'
|
|
163
162
|
constant.GAME_SEARCH // 'GameSearch'
|
|
164
163
|
```
|
|
165
164
|
|
package/package.json
CHANGED
package/src/api/account.js
CHANGED
|
@@ -2,7 +2,6 @@ export default {
|
|
|
2
2
|
bindingStatus: () => ({ url: 'account-binding/status', method: 'GET' }),
|
|
3
3
|
applyBinding: (data) => ({ url: 'account-binding/bind', method: 'POST', params: data }),
|
|
4
4
|
bindingVerification: (data) => ({ url: 'account-binding/acknowledge', method: 'POST', params: data }),
|
|
5
|
-
bindThirdParty: (data) => ({ url: 'account-binding/bind-third-party', method: 'GET', params: data }),
|
|
6
5
|
bindPassword: (data) => ({ url: 'account-binding/bind-password', method: 'POST', params: data }),
|
|
7
6
|
resetOtp: (data) => ({ url: 'account-binding/reset-otp', method: 'POST', params: data }),
|
|
8
7
|
}
|
package/src/api/activity.js
CHANGED
|
@@ -18,39 +18,12 @@ export default {
|
|
|
18
18
|
params: { appSecret },
|
|
19
19
|
isPublic: true,
|
|
20
20
|
}),
|
|
21
|
-
getTournamentDetail: ({ activityNo, appSecret }) => ({
|
|
22
|
-
url: 'tournament/detail',
|
|
23
|
-
method: 'get',
|
|
24
|
-
params: { activityNo, appSecret },
|
|
25
|
-
isPublic: true,
|
|
26
|
-
}),
|
|
27
21
|
getActivityDetail: ({ activityNo, appSecret, silent = false }) => ({
|
|
28
22
|
url: 'activities',
|
|
29
23
|
method: 'get',
|
|
30
24
|
params: { activityNo, appSecret },
|
|
31
25
|
silent,
|
|
32
26
|
}),
|
|
33
|
-
getActivityRanking: ({ appSecret }) => ({
|
|
34
|
-
url: 'activities/activity/ranking',
|
|
35
|
-
method: 'get',
|
|
36
|
-
params: { appSecret },
|
|
37
|
-
isPublic: true,
|
|
38
|
-
}),
|
|
39
|
-
getAchievements: ({ limit, page, appSecret }) => ({
|
|
40
|
-
url: 'activities/achievements',
|
|
41
|
-
method: 'get',
|
|
42
|
-
params: {
|
|
43
|
-
limit,
|
|
44
|
-
page,
|
|
45
|
-
appSecret,
|
|
46
|
-
},
|
|
47
|
-
}),
|
|
48
|
-
getAchievementsProgress: ({ achievementNo, appSecret }) => ({
|
|
49
|
-
url: 'activities/achievements/progress',
|
|
50
|
-
method: 'get',
|
|
51
|
-
params: { achievementNo, appSecret },
|
|
52
|
-
}),
|
|
53
|
-
getAchievementsIssued: () => ({ url: 'activities/achievements/issue', method: 'get' }),
|
|
54
27
|
postPromoCode: (promoCode) => ({
|
|
55
28
|
url: 'activities/promo',
|
|
56
29
|
method: 'post',
|
|
@@ -85,7 +58,6 @@ export default {
|
|
|
85
58
|
settleAmount: (data) => ({ url: 'activities/exchange/diamond/settle', method: 'post', params: data }),
|
|
86
59
|
exchange: (data) => ({ url: 'activities/exchange', method: 'post', params: data }),
|
|
87
60
|
collect: (data) => ({ url: 'activities/collect', method: 'post', params: data }),
|
|
88
|
-
getVipTable: ({ appSecret }) => ({ url: 'activities/viptable', method: 'get', params: { appSecret } }),
|
|
89
61
|
getLevelBonusInfo: () => ({ url: 'activities/level-bonus/info', method: 'get' }),
|
|
90
62
|
getRankingList: () => ({ url: 'activities/ranking', method: 'get' }),
|
|
91
63
|
getPublicRankingList: ({ appSecret }) => ({
|
|
@@ -94,21 +66,12 @@ export default {
|
|
|
94
66
|
isPublic: true,
|
|
95
67
|
params: { appSecret },
|
|
96
68
|
}),
|
|
97
|
-
exchangeDiamond: ({ activityNo, exchangeAward = [] }) => ({
|
|
98
|
-
url: 'activities/exchange/diamond',
|
|
99
|
-
method: 'post',
|
|
100
|
-
params: {
|
|
101
|
-
activityNo,
|
|
102
|
-
exchangeAward,
|
|
103
|
-
},
|
|
104
|
-
}),
|
|
105
69
|
getHonorBroadcast: ({ isPwa = false, appSecret }) => ({
|
|
106
70
|
url: 'activities/honorBroadcast',
|
|
107
71
|
method: 'get',
|
|
108
72
|
params: { isPwa, appSecret },
|
|
109
73
|
isPublic: true,
|
|
110
74
|
}),
|
|
111
|
-
getInstantRebateCollectTime: () => ({ url: 'activities/rebate/collectTime', method: 'get' }),
|
|
112
75
|
instantRebateEstimate: () => ({ url: 'activities/rebate/estimate', method: 'get' }),
|
|
113
76
|
instantRebateCollect: () => ({ url: 'activities/rebate/collect', method: 'get' }),
|
|
114
77
|
instantRebateHistory: ({ startDate, endDate, appSecret }) => ({
|
package/src/api/auth.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import pickBy from 'lodash/pickBy'
|
|
2
2
|
export default {
|
|
3
|
-
guestLogin: () => ({
|
|
4
|
-
url: 'guestLogin',
|
|
5
|
-
method: 'post',
|
|
6
|
-
isPublic: true,
|
|
7
|
-
}),
|
|
8
3
|
login: ({ username, password, provider, countryCode, phone, email, dt, reCaptchaToken, additionalUserInfo, loginType, isSignature, idToken }) => ({
|
|
9
4
|
url: 'login',
|
|
10
5
|
method: 'post',
|
|
@@ -12,25 +7,6 @@ export default {
|
|
|
12
7
|
isPublic: true,
|
|
13
8
|
headers: { 'x-access-captcha': reCaptchaToken },
|
|
14
9
|
}),
|
|
15
|
-
loginApp: ({ provider, accessToken, channel, subchannel, dt, from, id, name, picture }) => ({
|
|
16
|
-
url: 'appLogin',
|
|
17
|
-
method: 'post',
|
|
18
|
-
params: {
|
|
19
|
-
provider,
|
|
20
|
-
data: {
|
|
21
|
-
accessToken,
|
|
22
|
-
channel,
|
|
23
|
-
subchannel,
|
|
24
|
-
dt,
|
|
25
|
-
from,
|
|
26
|
-
id,
|
|
27
|
-
name,
|
|
28
|
-
picture,
|
|
29
|
-
provider,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
isPublic: true,
|
|
33
|
-
}),
|
|
34
10
|
register: ({ ac, fc = null, reCaptchaToken, dt, ...rest }) => {
|
|
35
11
|
const params = pickBy({ ac, fc }, (value) => {
|
|
36
12
|
return value !== undefined && value !== null
|
|
@@ -47,13 +23,6 @@ export default {
|
|
|
47
23
|
}
|
|
48
24
|
},
|
|
49
25
|
logout: () => ({ url: 'logout', method: 'post' }),
|
|
50
|
-
// bindGet for 'google' | 'zalo' | 'facebook'
|
|
51
|
-
bindGet: ({ x, provider, redirectURI }) => ({ url: 'bind', method: 'get', params: { x, provider, redirectURI } }),
|
|
52
|
-
bindPost: ({ provider, countryCode, phone, email }) => ({
|
|
53
|
-
url: 'bind',
|
|
54
|
-
method: 'post',
|
|
55
|
-
params: { provider, countryCode, phone, email },
|
|
56
|
-
}),
|
|
57
26
|
checkAccount: ({ account, nick_name, strategy, appSecret }) => ({
|
|
58
27
|
url: 'checkAccount',
|
|
59
28
|
method: 'post',
|
package/src/api/game.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
getGameCategory: ({ id, first } = {}) => ({ method: 'get', url: 'game/list/v2/category', params: { id, first } }),
|
|
3
|
-
addFavoriteGame: (code) => ({ method: 'post', url: 'game/myfavorite/add', params: { games: [code] } }),
|
|
4
|
-
removeFavoriteGame: (code) => ({ method: 'post', url: 'game/myfavorite/remove', params: { games: [code] } }),
|
|
5
|
-
getStatements: () => ({ url: 'game/statements', method: 'get' }),
|
|
6
2
|
playGame: (params) => ({ url: 'game/play', method: 'get', params }),
|
|
7
3
|
demoGame: (params) => ({ url: 'game/demo', method: 'get', params, isPublic: true }),
|
|
8
4
|
logoutGame: ({ uid_site, provider_id }) => ({ url: 'game/logout', method: 'get', params: { uid_site, provider_id } }),
|
|
@@ -90,12 +86,6 @@ export default {
|
|
|
90
86
|
addListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/addMyFavorite', params: { games: [code] } }),
|
|
91
87
|
removeListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/removeMyFavorite', params: { games: [code] } }),
|
|
92
88
|
getGameInfo: ({ appSecret, gameCode }) => ({ method: 'get', url: 'game/info', params: { appSecret, gameCode } }),
|
|
93
|
-
getGameReplayInfo: ({ providerId, seqNo, lang, appSecret }) => ({
|
|
94
|
-
method: 'get',
|
|
95
|
-
url: 'game/gameReplay',
|
|
96
|
-
params: { providerId, seqNo, lang, appSecret },
|
|
97
|
-
isPublic: true,
|
|
98
|
-
}),
|
|
99
89
|
getFreeGameList: () => ({ method: 'get', url: 'activities/getFreeGameRewardList' }),
|
|
100
90
|
getFreeGameReward: ({ activityNo, receiveNo }) => ({ method: 'post', url: 'activities/getFreeGameReward', params: { activityNo, receiveNo } }),
|
|
101
91
|
getV3GameInfo: ({ appSecret, gameCodes }) => ({ method: 'post', url: 'game/list/v3/gameInfo', params: { appSecret, gameCodes } }),
|
package/src/api/payment.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
getPaymentHistory: (returnDays) => ({ url: 'payment/v2/history', method: 'post', params: { returnDays } }),
|
|
3
|
-
getSpotMarket: () => ({ url: 'payment/v2/spotmarket', method: 'get' }),
|
|
4
2
|
getTransactionHistory: (payload) => ({
|
|
5
3
|
url: 'payment/v2/transactionHistory',
|
|
6
4
|
method: 'post',
|
|
@@ -59,18 +57,7 @@ export default {
|
|
|
59
57
|
getBankList: (paymentMethod) => ({ url: `payment/v2/${paymentMethod}/getBankList`, method: 'get' }),
|
|
60
58
|
getBindingBankList: ({ appSecret }) => ({ url: 'payment/v2/getBindingBankList', method: 'get', params: { appSecret }, isPublic: true }),
|
|
61
59
|
getBindingPaymentList: ({ appSecret }) => ({ url: 'payment/v2/getBindingPaymentList', method: 'get', params: { appSecret } }),
|
|
62
|
-
getWithdrawBankList: () => ({ url: 'payment/v2/getWithdrawBankList', method: 'get' }),
|
|
63
|
-
makeTransaction: ({ type, payload, paymentMethod }) => ({
|
|
64
|
-
url: `payment/v2/${paymentMethod}/transaction`,
|
|
65
|
-
method: 'post',
|
|
66
|
-
params: {
|
|
67
|
-
transferType: type,
|
|
68
|
-
...payload,
|
|
69
|
-
},
|
|
70
|
-
}),
|
|
71
|
-
checkTransaction: (paymentMethod) => ({ url: `payment/v2/${paymentMethod}/checkTransaction`, method: 'post' }),
|
|
72
60
|
setBonusSetting: ({ bonus }) => ({ url: 'payment/v2/setting', method: 'post', params: { bonus } }),
|
|
73
|
-
getCurrentWithdrawRule: () => ({ url: 'payment/v2/getCurrentWithdrawRule', method: 'get' }),
|
|
74
61
|
getDoubleWalletWithdrawRule: ({ walletType }) => ({
|
|
75
62
|
url: 'payment/v2/withdrawRule',
|
|
76
63
|
method: 'post',
|
|
@@ -81,7 +68,6 @@ export default {
|
|
|
81
68
|
method: 'post',
|
|
82
69
|
params: { exchangeType, cryptoNetwork, targetAddress },
|
|
83
70
|
}),
|
|
84
|
-
mergeWallet: () => ({ url: 'payment/v2/mergeWallet', method: 'post' }),
|
|
85
71
|
getPaymentDetail: ({ transferType } = {}) => ({
|
|
86
72
|
url: 'payment/v2/paymentDetail',
|
|
87
73
|
method: 'post',
|
|
@@ -102,11 +88,6 @@ export default {
|
|
|
102
88
|
method: 'post',
|
|
103
89
|
params: { transferType: 'WITHDRAW', amount, cryptoCurrency, promotionsNo },
|
|
104
90
|
}),
|
|
105
|
-
getWithdrawExpectedResult: ({ method, amount, cryptoNetwork }) => ({
|
|
106
|
-
url: `payment/v2/${method}/expected/result`,
|
|
107
|
-
method: 'post',
|
|
108
|
-
params: { transferType: 'WITHDRAW', amount, cryptoNetwork },
|
|
109
|
-
}),
|
|
110
91
|
submitDepositTransactionCrypto: ({ method, amount, cryptoCurrency, cryptoNetwork, sourceAddress, promotionsNo, receipt }) => ({
|
|
111
92
|
url: `payment/v2/${method}/transaction`,
|
|
112
93
|
method: 'post',
|
|
@@ -193,38 +174,6 @@ export default {
|
|
|
193
174
|
applyerHolderName,
|
|
194
175
|
},
|
|
195
176
|
}),
|
|
196
|
-
submitWithdrawTransactionManual: ({
|
|
197
|
-
method,
|
|
198
|
-
amount,
|
|
199
|
-
applyerBankCode,
|
|
200
|
-
applyerAccountNumber,
|
|
201
|
-
applyerIfscCode,
|
|
202
|
-
branch,
|
|
203
|
-
holderName,
|
|
204
|
-
cryptoCurrency,
|
|
205
|
-
cryptoNetwork,
|
|
206
|
-
targetAddress,
|
|
207
|
-
}) => ({
|
|
208
|
-
url: `payment/v2/${method}/withdraw-otp/verify`,
|
|
209
|
-
method: 'post',
|
|
210
|
-
params: {
|
|
211
|
-
transferType: 'WITHDRAW',
|
|
212
|
-
amount,
|
|
213
|
-
applyerBankCode,
|
|
214
|
-
applyerAccountNumber,
|
|
215
|
-
applyerIfscCode,
|
|
216
|
-
branch,
|
|
217
|
-
holderName,
|
|
218
|
-
cryptoCurrency,
|
|
219
|
-
cryptoNetwork,
|
|
220
|
-
targetAddress,
|
|
221
|
-
},
|
|
222
|
-
}),
|
|
223
|
-
submitWithdrawTransactionAmb: ({ method, amount }) => ({
|
|
224
|
-
url: `payment/v2/${method}/transaction`,
|
|
225
|
-
method: 'post',
|
|
226
|
-
params: { transferType: 'WITHDRAW', amount },
|
|
227
|
-
}),
|
|
228
177
|
getPromotionsList: () => ({ url: `payment/v2/bankWallet/promotions`, method: 'get' }),
|
|
229
178
|
getWithdrawRulePreview: ({ applyType, applyNo, amount, isFreeGame }) => ({
|
|
230
179
|
url: `payment/v2/bankWallet/promotion/preview`,
|
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
|
|
5
|
+
import { constant, storage, paramStore } from './util/index.js'
|
|
6
6
|
|
|
7
|
-
export { api, machine, Request, Config,
|
|
7
|
+
export { api, machine, Request, Config, constant, storage, paramStore }
|
|
@@ -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
|
},
|