@jetthai/cuora 1.0.77 → 1.0.78

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.0.78](https://github.com/jetthai/cuora-module/compare/v1.0.77...v1.0.78) (2022-01-14)
6
+
5
7
  ### [1.0.77](https://github.com/jetthai/cuora-module/compare/v1.0.76...v1.0.77) (2022-01-12)
6
8
 
7
9
  ### [1.0.76](https://github.com/jetthai/cuora-module/compare/v1.0.75...v1.0.76) (2022-01-11)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.0.77",
3
+ "version": "1.0.78",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
@@ -266,7 +266,11 @@ export default function (request) {
266
266
  },
267
267
  guards: {
268
268
  isCalculable: (context, event) => {
269
- return context.amount
269
+ const {
270
+ amount,
271
+ currentPayment: { maximum, minimum },
272
+ } = context
273
+ return amount && minimum <= +amount && +amount <= maximum
270
274
  },
271
275
  isCalculated: (context, event) => {
272
276
  return context.calculation