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

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,8 @@
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-6](https://github.com/jetthai/cuora-module/compare/v1.1.302-dev-5...v1.1.302-dev-6) (2024-09-11)
6
+
5
7
  ### [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
8
 
7
9
  ### [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-6",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -178,14 +178,12 @@ 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
+ if (alreadyCalculatedAfterFiveMinutes) {
188
184
  return Math.floor(`${currentTime}`) - Math.floor(`${lastEstimateTime}`) > fiveMinutes
185
+ } else {
186
+ return true
189
187
  }
190
188
  },
191
189
  isClaimAmountLimitReached: (context, event) => {