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

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,10 @@
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-7](https://github.com/jetthai/cuora-module/compare/v1.1.302-dev-6...v1.1.302-dev-7) (2024-09-11)
6
+
7
+ ### [1.1.302-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.302-dev-5...v1.1.302-dev-6) (2024-09-11)
8
+
5
9
  ### [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
10
 
7
11
  ### [1.1.302-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.304...v1.1.302-dev-4) (2024-09-09)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.302-dev-5",
3
+ "version": "1.1.302-dev-7",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -178,14 +178,13 @@ export default function (request) {
178
178
  },
179
179
  guards: {
180
180
  isEstimatable: (context, event) => {
181
- const { lastEstimateTime } = context
181
+ const { lastEstimateTime, alreadyCalculatedAfterFiveMinutes } = context
182
182
  const currentTime = new Date().getTime() / 1000
183
- if (Math.floor(`${currentTime}`) === Math.floor(`${lastEstimateTime}`)) {
184
- return true
185
- } else {
186
- const fiveMinutes = 60 * 5
187
-
183
+ const fiveMinutes = 60 * 5
184
+ if (alreadyCalculatedAfterFiveMinutes) {
188
185
  return Math.floor(`${currentTime}`) - Math.floor(`${lastEstimateTime}`) > fiveMinutes
186
+ } else {
187
+ return true
189
188
  }
190
189
  },
191
190
  isClaimAmountLimitReached: (context, event) => {