@jetthai/cuora 1.1.302-dev-2 → 1.1.302-dev-4
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,12 +2,28 @@
|
|
|
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.302-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.304...v1.1.302-dev-4) (2024-09-09)
|
|
6
|
+
|
|
7
|
+
### [1.1.302-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.302-dev-2...v1.1.302-dev-3) (2024-09-06)
|
|
8
|
+
|
|
5
9
|
### [1.1.302-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.302-dev-1...v1.1.302-dev-2) (2024-09-04)
|
|
6
10
|
|
|
7
11
|
### [1.1.302-dev-1](https://github.com/jetthai/cuora-module/compare/v1.0.302-dev-1...v1.1.302-dev-1) (2024-09-04)
|
|
8
12
|
|
|
9
13
|
### [1.0.302-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.302...v1.0.302-dev-1) (2024-09-04)
|
|
10
14
|
|
|
15
|
+
### [1.1.302-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.302-dev-2...v1.1.302-dev-3) (2024-09-06)
|
|
16
|
+
|
|
17
|
+
### [1.1.302-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.302-dev-1...v1.1.302-dev-2) (2024-09-04)
|
|
18
|
+
|
|
19
|
+
### [1.1.302-dev-1](https://github.com/jetthai/cuora-module/compare/v1.0.302-dev-1...v1.1.302-dev-1) (2024-09-04)
|
|
20
|
+
|
|
21
|
+
### [1.0.302-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.302...v1.0.302-dev-1) (2024-09-04)
|
|
22
|
+
|
|
23
|
+
### [1.1.304](https://github.com/jetthai/cuora-module/compare/v1.1.303...v1.1.304) (2024-09-09)
|
|
24
|
+
|
|
25
|
+
### [1.1.303](https://github.com/jetthai/cuora-module/compare/v1.1.302...v1.1.303) (2024-09-09)
|
|
26
|
+
|
|
11
27
|
### [1.1.302](https://github.com/jetthai/cuora-module/compare/v1.1.301...v1.1.302) (2024-09-02)
|
|
12
28
|
|
|
13
29
|
### [1.1.301](https://github.com/jetthai/cuora-module/compare/v1.1.300...v1.1.301) (2024-09-02)
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@ export default function (request) {
|
|
|
19
19
|
singleMinimumAmountReceive: null,
|
|
20
20
|
remainingCount: 0,
|
|
21
21
|
dailyRedemptionLimit: 0,
|
|
22
|
-
|
|
22
|
+
reachedAmountLimit: false,
|
|
23
23
|
activityNo: null,
|
|
24
24
|
},
|
|
25
25
|
initial: 'idle',
|
|
@@ -76,12 +76,14 @@ export default function (request) {
|
|
|
76
76
|
},
|
|
77
77
|
checking: {
|
|
78
78
|
always: [
|
|
79
|
+
{ target: 'claimAmountLimitReached', cond: 'isClaimAmountLimitReached' },
|
|
79
80
|
{ target: 'claimExhausted', cond: 'isClaimExhausted' },
|
|
80
81
|
{ target: 'insufficientAmount', cond: 'isInsufficientAmount' },
|
|
81
82
|
{ target: 'claimEnable', cond: 'isClaimEnable' },
|
|
82
83
|
{ target: 'cantEstimate' },
|
|
83
84
|
],
|
|
84
85
|
},
|
|
86
|
+
claimAmountLimitReached: {},
|
|
85
87
|
claimExhausted: {},
|
|
86
88
|
insufficientAmount: {},
|
|
87
89
|
claimEnable: {
|
|
@@ -145,6 +147,7 @@ export default function (request) {
|
|
|
145
147
|
singleMinimumAmountReceive = 0,
|
|
146
148
|
remainingCount = 0,
|
|
147
149
|
dailyRedemptionLimit = 0,
|
|
150
|
+
reachedAmountLimit = false,
|
|
148
151
|
} = event.data
|
|
149
152
|
|
|
150
153
|
return {
|
|
@@ -159,6 +162,7 @@ export default function (request) {
|
|
|
159
162
|
singleMinimumAmountReceive,
|
|
160
163
|
remainingCount,
|
|
161
164
|
dailyRedemptionLimit,
|
|
165
|
+
reachedAmountLimit,
|
|
162
166
|
}
|
|
163
167
|
}),
|
|
164
168
|
},
|
|
@@ -174,6 +178,10 @@ export default function (request) {
|
|
|
174
178
|
return Math.floor(`${currentTime}`) - Math.floor(`${lastEstimateTime}`) > fiveMinutes
|
|
175
179
|
}
|
|
176
180
|
},
|
|
181
|
+
isClaimAmountLimitReached: (context, event) => {
|
|
182
|
+
const { reachedAmountLimit } = context
|
|
183
|
+
return reachedAmountLimit
|
|
184
|
+
},
|
|
177
185
|
isClaimExhausted: (context, event) => {
|
|
178
186
|
const { collectAvailable, remainingCount, dailyRedemptionLimit } = context
|
|
179
187
|
return !collectAvailable && parseInt(`${remainingCount}`) === parseInt(`${dailyRedemptionLimit}`)
|
package/src/machine/auth.js
CHANGED
|
@@ -166,13 +166,25 @@ export default function (request) {
|
|
|
166
166
|
invoke: {
|
|
167
167
|
src: 'checkDeviceToken',
|
|
168
168
|
onDone: {
|
|
169
|
-
target: '
|
|
169
|
+
target: 'checkDeviceTokenDone',
|
|
170
170
|
},
|
|
171
171
|
onError: {
|
|
172
172
|
target: 'fetching',
|
|
173
173
|
},
|
|
174
174
|
},
|
|
175
175
|
},
|
|
176
|
+
checkDeviceTokenDone: {
|
|
177
|
+
invoke: {
|
|
178
|
+
src: 'fetchUserInfo',
|
|
179
|
+
onDone: {
|
|
180
|
+
target: 'pending',
|
|
181
|
+
actions: ['setUserInfo', 'extendToken'],
|
|
182
|
+
},
|
|
183
|
+
onError: {
|
|
184
|
+
target: '#auth.leaving',
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
176
188
|
fetching: {
|
|
177
189
|
invoke: {
|
|
178
190
|
src: 'fetchUserInfo',
|