diff --git a/src/components/Common/InputField.js b/src/components/Common/InputField.js index 354fb184a..8913cbd03 100644 --- a/src/components/Common/InputField.js +++ b/src/components/Common/InputField.js @@ -29,7 +29,7 @@ export const InputField = props => { onPaste={props.onPaste} />
{props.description}
- { props.pristine ?:
{error}
} + { props.pristine ? :{error}
} ); }; diff --git a/src/components/Common/__snapshots__/AddressInput.spec.js.snap b/src/components/Common/__snapshots__/AddressInput.spec.js.snap index 1bf90ce32..98cf82e29 100644 --- a/src/components/Common/__snapshots__/AddressInput.spec.js.snap +++ b/src/components/Common/__snapshots__/AddressInput.spec.js.snap @@ -26,6 +26,7 @@ exports[`AddressInput Should render the component 1`] = ` Where the money goes after investors transactions. Immediately after each transaction. We recommend to setup a multisig wallet with hardware based signers.
( 'button_fill': !disabled } )}> - Distribute tokens + Distribute reserved tokens diff --git a/src/components/manage/__snapshots__/DistributeTokensStep.spec.js.snap b/src/components/manage/__snapshots__/DistributeTokensStep.spec.js.snap index 1fd9494c3..58327cbde 100644 --- a/src/components/manage/__snapshots__/DistributeTokensStep.spec.js.snap +++ b/src/components/manage/__snapshots__/DistributeTokensStep.spec.js.snap @@ -29,7 +29,7 @@ exports[`DistributeTokensStep should render the component with active button 1`] - Distribute tokens + Distribute reserved tokens @@ -65,7 +65,7 @@ exports[`DistributeTokensStep should render the component with disabled button 1 - Distribute tokens + Distribute reserved tokens diff --git a/src/components/stepThree/StepThreeForm.js b/src/components/stepThree/StepThreeForm.js index a9927a1b3..81ce531b5 100644 --- a/src/components/stepThree/StepThreeForm.js +++ b/src/components/stepThree/StepThreeForm.js @@ -104,8 +104,7 @@ export const StepThreeForm = ({ handleSubmit, values, invalid, pristine, mutator component={InputField2} validate={composeValidators( isNonNegative(), - isDecimalPlacesNotGreaterThan()(props.decimals), - isLessOrEqualThan('Should be less or equal than the supply of some tier')(props.tierStore.maxSupply) + isDecimalPlacesNotGreaterThan()(props.decimals) )} disabled={values.whitelistEnabled === 'yes'} errorStyle={inputErrorStyle} diff --git a/src/components/stepThree/__snapshots__/CrowdsaleBlock.spec.js.snap b/src/components/stepThree/__snapshots__/CrowdsaleBlock.spec.js.snap index ab482b38c..5baca4761 100644 --- a/src/components/stepThree/__snapshots__/CrowdsaleBlock.spec.js.snap +++ b/src/components/stepThree/__snapshots__/CrowdsaleBlock.spec.js.snap @@ -330,6 +330,7 @@ exports[`CrowdsaleBlock Should render the component for the first Tier 1`] = ` Exchange rate Ethereum to Tokens. If it's 100, then for 1 Ether you can buy 100 tokens
{
+ const errors = {}
+ const maxSupply = tierStore.maxSupply
+ const minCap = maxSupply !== 0
+ ? isLessOrEqualThan('Should be less or equal than the supply of some tier')(maxSupply)(values.minCap)
+ : undefined
+
+ if (minCap) errors.minCap = minCap
+
+ return errors
+ }}
/>