From 5bcd9b49272a2a14962af39bc6d27813d9c5c405 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 29 May 2019 16:11:54 -0400 Subject: [PATCH] fix: 0 cost offers and too small input --- .../Sell/6_Margin/components/MarginSelectorForm.jsx | 8 ++++---- src/js/wizards/Sell/6_Margin/index.jsx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/js/wizards/Sell/6_Margin/components/MarginSelectorForm.jsx b/src/js/wizards/Sell/6_Margin/components/MarginSelectorForm.jsx index 9395cceb..1ee5fc9e 100644 --- a/src/js/wizards/Sell/6_Margin/components/MarginSelectorForm.jsx +++ b/src/js/wizards/Sell/6_Margin/components/MarginSelectorForm.jsx @@ -5,7 +5,7 @@ import {FormGroup, InputGroup, InputGroupAddon, InputGroupText, Col, Row} from ' import Input from 'react-validation/build/input'; import {withNamespaces} from 'react-i18next'; import Form from 'react-validation/build/form'; -import {isNumber, required, lowerEqThan, higherEqThan} from '../../../../validators'; +import {isNumber, required, lowerEqThan, higherThan} from '../../../../validators'; import Slider from 'rc-slider/lib/Slider'; import 'rc-slider/assets/index.css'; import './MarginSelectorForm.scss'; @@ -29,8 +29,8 @@ class MarginSelectorForm extends Component {

{t('sellerMarginContainer.title')}

- - + this.onMarginChange(value)} value={margin}/> @@ -42,7 +42,7 @@ class MarginSelectorForm extends Component { className="form-control prepend" value={margin} onChange={(e) => this.onMarginChange(e.target.value)} - validations={[required, isNumber, lowerEqThan.bind(null, 100), higherEqThan.bind(null, -100)]}/> + validations={[required, isNumber, lowerEqThan.bind(null, 100), higherThan.bind(null, -100)]}/> % diff --git a/src/js/wizards/Sell/6_Margin/index.jsx b/src/js/wizards/Sell/6_Margin/index.jsx index 459d3726..c09000a3 100644 --- a/src/js/wizards/Sell/6_Margin/index.jsx +++ b/src/js/wizards/Sell/6_Margin/index.jsx @@ -52,7 +52,7 @@ class Margin extends Component { } validate(margin) { - if ((margin || margin === 0) && margin <= 100 && margin >= -100) { + if ((margin || margin === 0) && margin <= 100 && margin > -100) { return this.props.footer.enableNext(); } this.props.footer.disableNext();