@bosonprotocol/chat-sdk
Advanced tools
Comparing version 1.0.2-alpha.7 to 1.0.2-alpha.8
@@ -82,8 +82,8 @@ "use strict"; | ||
.required() | ||
.test("isAPositiveInteger", "Percentage amount should be a positive integer", (value) => { | ||
return !!(0, yup_1.number)() | ||
.test("isAPositiveInteger", "Percentage amount should be a positive integer, without even a dot", (value) => { | ||
return (!!(0, yup_1.number)() | ||
.required() | ||
.positive() | ||
.integer() | ||
.validateSync(Number(value)); | ||
.validateSync(Number(value)) && !value.includes(".")); | ||
}), | ||
@@ -90,0 +90,0 @@ signature: (0, yup_1.string)().required() |
@@ -67,8 +67,8 @@ import { object, string, number, mixed, array } from "yup"; | ||
.required() | ||
.test("isAPositiveInteger", "Percentage amount should be a positive integer", (value) => { | ||
return !!number() | ||
.test("isAPositiveInteger", "Percentage amount should be a positive integer, without even a dot", (value) => { | ||
return (!!number() | ||
.required() | ||
.positive() | ||
.integer() | ||
.validateSync(Number(value)); | ||
.validateSync(Number(value)) && !value.includes(".")); | ||
}), | ||
@@ -75,0 +75,0 @@ signature: string().required() |
{ | ||
"name": "@bosonprotocol/chat-sdk", | ||
"version": "1.0.2-alpha.7", | ||
"version": "1.0.2-alpha.8", | ||
"description": "Extension of @xmtp/xmtp-js with support for chat threads and further message types.", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
@@ -87,9 +87,11 @@ import { object, string, number, mixed, array } from "yup"; | ||
"isAPositiveInteger", | ||
"Percentage amount should be a positive integer", | ||
"Percentage amount should be a positive integer, without even a dot", | ||
(value) => { | ||
return !!number() | ||
.required() | ||
.positive() | ||
.integer() | ||
.validateSync(Number(value)); | ||
return ( | ||
!!number() | ||
.required() | ||
.positive() | ||
.integer() | ||
.validateSync(Number(value)) && !value.includes(".") | ||
); | ||
} | ||
@@ -96,0 +98,0 @@ ), |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
158253
2737