1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

price validation fix (#1366)

Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
This commit is contained in:
claudiaHash 2022-04-27 22:42:25 +03:00 committed by GitHub
parent 8271963292
commit b6ad55dda4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,6 +85,7 @@ const validationPricing = {
amountDataToken: Yup.number().required('Required'),
amountOcean: Yup.number()
.test('validator-min-amountOcean', '', function (value) {
if (this.parent.type === 'fixed') return true
const minValue =
this.parent.price > 0
? new Decimal(this.parent.price)