@jetthai/cuora 1.1.302-dev-3 → 1.1.302-dev-5

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,6 +2,18 @@
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-5](https://github.com/jetthai/cuora-module/compare/v1.1.302-dev-4...v1.1.302-dev-5) (2024-09-11)
6
+
7
+ ### [1.1.302-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.304...v1.1.302-dev-4) (2024-09-09)
8
+
9
+ ### [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)
10
+
11
+ ### [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)
12
+
13
+ ### [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)
14
+
15
+ ### [1.0.302-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.302...v1.0.302-dev-1) (2024-09-04)
16
+
5
17
  ### [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)
6
18
 
7
19
  ### [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)
@@ -10,6 +22,10 @@ All notable changes to this project will be documented in this file. See [standa
10
22
 
11
23
  ### [1.0.302-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.302...v1.0.302-dev-1) (2024-09-04)
12
24
 
25
+ ### [1.1.304](https://github.com/jetthai/cuora-module/compare/v1.1.303...v1.1.304) (2024-09-09)
26
+
27
+ ### [1.1.303](https://github.com/jetthai/cuora-module/compare/v1.1.302...v1.1.303) (2024-09-09)
28
+
13
29
  ### [1.1.302](https://github.com/jetthai/cuora-module/compare/v1.1.301...v1.1.302) (2024-09-02)
14
30
 
15
31
  ### [1.1.301](https://github.com/jetthai/cuora-module/compare/v1.1.300...v1.1.301) (2024-09-02)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.302-dev-3",
3
+ "version": "1.1.302-dev-5",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -16,10 +16,11 @@ export default function (request) {
16
16
  cumulativeRebateAmount: null,
17
17
  actualRebateAmount: null,
18
18
  rewardType: null,
19
+ alreadyCalculatedAfterFiveMinutes: false,
19
20
  singleMinimumAmountReceive: null,
20
21
  remainingCount: 0,
21
22
  dailyRedemptionLimit: 0,
22
- collectAmount: 0,
23
+ reachedAmountLimit: false,
23
24
  activityNo: null,
24
25
  },
25
26
  initial: 'idle',
@@ -76,12 +77,14 @@ export default function (request) {
76
77
  },
77
78
  checking: {
78
79
  always: [
80
+ { target: 'claimAmountLimitReached', cond: 'isClaimAmountLimitReached' },
79
81
  { target: 'claimExhausted', cond: 'isClaimExhausted' },
80
82
  { target: 'insufficientAmount', cond: 'isInsufficientAmount' },
81
83
  { target: 'claimEnable', cond: 'isClaimEnable' },
82
84
  { target: 'cantEstimate' },
83
85
  ],
84
86
  },
87
+ claimAmountLimitReached: {},
85
88
  claimExhausted: {},
86
89
  insufficientAmount: {},
87
90
  claimEnable: {
@@ -129,8 +132,17 @@ export default function (request) {
129
132
  estimateStartTime = 0,
130
133
  estimateEndTime = 0,
131
134
  rewardType,
135
+ alreadyCalculatedAfterFiveMinutes = false,
132
136
  } = event.data
133
- return { enableCollectButton, lastCollectTime, lastEstimateTime, estimateStartTime, estimateEndTime, rewardType }
137
+ return {
138
+ enableCollectButton,
139
+ lastCollectTime,
140
+ lastEstimateTime,
141
+ estimateStartTime,
142
+ estimateEndTime,
143
+ rewardType,
144
+ alreadyCalculatedAfterFiveMinutes,
145
+ }
134
146
  }),
135
147
  setEstimateResult: assign((context, event) => {
136
148
  const {
@@ -145,6 +157,7 @@ export default function (request) {
145
157
  singleMinimumAmountReceive = 0,
146
158
  remainingCount = 0,
147
159
  dailyRedemptionLimit = 0,
160
+ reachedAmountLimit = false,
148
161
  } = event.data
149
162
 
150
163
  return {
@@ -159,6 +172,7 @@ export default function (request) {
159
172
  singleMinimumAmountReceive,
160
173
  remainingCount,
161
174
  dailyRedemptionLimit,
175
+ reachedAmountLimit,
162
176
  }
163
177
  }),
164
178
  },
@@ -174,6 +188,10 @@ export default function (request) {
174
188
  return Math.floor(`${currentTime}`) - Math.floor(`${lastEstimateTime}`) > fiveMinutes
175
189
  }
176
190
  },
191
+ isClaimAmountLimitReached: (context, event) => {
192
+ const { reachedAmountLimit } = context
193
+ return reachedAmountLimit
194
+ },
177
195
  isClaimExhausted: (context, event) => {
178
196
  const { collectAvailable, remainingCount, dailyRedemptionLimit } = context
179
197
  return !collectAvailable && parseInt(`${remainingCount}`) === parseInt(`${dailyRedemptionLimit}`)