@jetthai/cuora 1.1.422-dev-3 → 1.1.424-qa-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.
package/CHANGELOG.md CHANGED
@@ -2,79 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ### [1.1.422-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.424...v1.1.422-dev-3) (2026-03-20)
5
+ ### [1.1.424-qa-1](https://github.com/jetthai/cuora-module/compare/v1.1.424...v1.1.424-qa-1) (2026-03-23)
6
6
 
7
- ### [1.1.422-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.422-dev-1...v1.1.422-dev-2) (2026-03-17)
7
+ ### [1.1.421-qa-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.421-qa-1) (2026-03-16)
8
8
 
9
- ### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
9
+ ### [1.1.424](https://github.com/jetthai/cuora-module/compare/v1.1.423...v1.1.424) (2026-03-17)
10
10
 
11
- ### [1.1.413-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-10...v1.1.413-dev-11) (2026-03-12)
12
-
13
- ### [1.1.413-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-9...v1.1.413-dev-10) (2026-03-11)
14
-
15
- ### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
16
-
17
- ### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
18
-
19
- ### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
20
-
21
- ### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
22
-
23
- ### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
24
-
25
- ### [1.1.422-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.422-dev-1...v1.1.422-dev-2) (2026-03-17)
26
-
27
- ### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
28
-
29
- ### [1.1.413-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-10...v1.1.413-dev-11) (2026-03-12)
30
-
31
- ### [1.1.413-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-9...v1.1.413-dev-10) (2026-03-11)
32
-
33
- ### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
34
-
35
- ### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
36
-
37
- ### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
38
-
39
- ### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
40
-
41
- ### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
42
-
43
- ### [1.1.422-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.422-dev-1...v1.1.422-dev-2) (2026-03-17)
44
-
45
- ### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
46
-
47
- ### [1.1.413-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-10...v1.1.413-dev-11) (2026-03-12)
48
-
49
- ### [1.1.413-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-9...v1.1.413-dev-10) (2026-03-11)
50
-
51
- ### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
52
-
53
- ### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
54
-
55
- ### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
56
-
57
- ### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
58
-
59
- ### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
60
-
61
- ### [1.1.422-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.422-dev-1...v1.1.422-dev-2) (2026-03-17)
62
-
63
- ### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
64
-
65
- ### [1.1.413-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-10...v1.1.413-dev-11) (2026-03-12)
66
-
67
- ### [1.1.413-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-9...v1.1.413-dev-10) (2026-03-11)
68
-
69
- ### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
70
-
71
- ### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
72
-
73
- ### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
74
-
75
- ### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
76
-
77
- ### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
11
+ ### [1.1.423](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.423) (2026-03-17)
78
12
 
79
13
  ### [1.1.422](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.422) (2026-03-16)
80
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.422-dev-3",
3
+ "version": "1.1.424-qa-1",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -87,12 +87,6 @@ export default {
87
87
  getVipTable: ({ appSecret }) => ({ url: 'activities/viptable', method: 'get', params: { appSecret } }),
88
88
  getLevelBonusInfo: () => ({ url: 'activities/level-bonus/info', method: 'get' }),
89
89
  getRankingList: () => ({ url: 'activities/ranking', method: 'get' }),
90
- getPublicRankingList: ({ appSecret }) => ({
91
- url: 'activities/ranking/public/promotion-ranking',
92
- method: 'get',
93
- isPublic: true,
94
- params: { appSecret },
95
- }),
96
90
  exchangeDiamond: ({ activityNo, exchangeAward = [] }) => ({
97
91
  url: 'activities/exchange/diamond',
98
92
  method: 'post',
@@ -110,28 +110,6 @@ export default function (request) {
110
110
  },
111
111
  },
112
112
  otpChecking: {
113
- initial: 'pending',
114
- states: {
115
- pending: {
116
- after: {
117
- TIMEOUT: {
118
- target: 'fetching',
119
- },
120
- },
121
- },
122
- fetching: {
123
- invoke: {
124
- src: 'fetchUserInfo',
125
- onDone: {
126
- target: 'pending',
127
- actions: ['setUserInfo', 'extendToken'],
128
- },
129
- onError: {
130
- target: 'pending',
131
- },
132
- },
133
- },
134
- },
135
113
  on: {
136
114
  OTP_VERIFIED: {
137
115
  target: 'loginSuccess',
@@ -251,14 +251,8 @@ export default function (request, context) {
251
251
  },
252
252
  guards: {
253
253
  isCalculable: (context, event) => {
254
- const { selectedCrypto, selectedAddress, selectedAmount } = context
255
- return (
256
- selectedCrypto &&
257
- selectedAddress &&
258
- selectedAmount &&
259
- selectedCrypto.minimum <= +selectedAmount &&
260
- +selectedAmount <= selectedCrypto.maximum
261
- )
254
+ const { selectedCrypto, selectedAddress, cryptoBank, selectedAmount } = context
255
+ return selectedCrypto && selectedAddress && selectedAmount && cryptoBank.minimum <= +selectedAmount && +selectedAmount <= cryptoBank.maximum
262
256
  },
263
257
  isSubmittable: (context, event) => {
264
258
  const { selectedCrypto, selectedAddress, selectedAmount, depositTime, receipt, calculation, siteConfig } = context
@@ -37,13 +37,12 @@ export default function (request) {
37
37
  checking: {
38
38
  always: [
39
39
  { target: 'idle', actions: 'setActivityDetail', cond: 'isExist' },
40
- { target: 'loading', cond: 'hasActivityNoAndToken' },
41
- { target: 'idle' },
40
+ { target: 'loading', cond: 'hasActivityNo' },
42
41
  ],
43
42
  },
44
43
  loading: {
45
44
  invoke: {
46
- src: 'fetchActivityDetail',
45
+ src: 'fetchPublicActivityDetail',
47
46
  onDone: {
48
47
  target: 'idle',
49
48
  actions: ['setActivityMap', 'setActivityDetail'],
@@ -101,9 +100,8 @@ export default function (request) {
101
100
  const { activityMap, activityNo } = context
102
101
  return activityMap[activityNo]
103
102
  },
104
- hasActivityNoAndToken: (context, event) => {
105
- const hasToken = request.getToken()
106
- return !!context.activityNo && hasToken
103
+ hasActivityNo: (context, event) => {
104
+ return !!context.activityNo
107
105
  },
108
106
  },
109
107
  services: {
@@ -118,10 +116,15 @@ export default function (request) {
118
116
  const { data } = await request.send(hasToken ? api.getActivityList({ appSecret }) : api.getAllActivityList({ appSecret }))
119
117
  return data
120
118
  },
121
- fetchActivityDetail: async (context, event) => {
119
+ fetchPublicActivityDetail: async (context, event) => {
120
+ const hasToken = request.getToken()
122
121
  const { activityNo } = context
123
122
  let result = {}
124
- result = await request.send(api.getActivityDetail({ activityNo, appSecret }))
123
+ if (hasToken) {
124
+ result = await request.send(api.getActivityDetail({ activityNo, appSecret }))
125
+ } else {
126
+ result = await request.send(api.getTournamentDetail({ activityNo, appSecret }))
127
+ }
125
128
  return result.data
126
129
  },
127
130
  },