Skip to content

Commit

Permalink
Merge pull request #695 from poanetwork/revert-693-prevent-deploy-inv…
Browse files Browse the repository at this point in the history
…alid-minCap-#669

Revert "(Fix) Prevent deployment if minCap isn't valid"
  • Loading branch information
vbaranov committed Mar 15, 2018
2 parents a2b2ad2 + b5fe488 commit 3008dd3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/stepThree/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,14 @@ export class stepThree extends React.Component {

const { tierStore, gasPriceStore } = this.props
const gasPriceIsValid = gasPriceStore.custom.id !== this.state.gasPriceSelected || this.state.validation.gasPrice.valid === VALID
const isMinCapLessThanMaxSupply = tierStore.globalMinCap <= tierStore.maxSupply
const isMinCapValid = this.state.validation.minCap.valid === VALID
const isMinCapValid = tierStore.globalMinCap <= tierStore.maxSupply

for (let index = 0; index < tierStore.tiers.length; index++) {
tierStore.validateTiers('endTime', index)
tierStore.validateTiers('startTime', index)
}

if (!isMinCapLessThanMaxSupply) {
if (!isMinCapValid) {
this.setState(update(this.state, {
validation: {
minCap: {
Expand All @@ -150,7 +149,7 @@ export class stepThree extends React.Component {
}))
}

if (tierStore.areTiersValid && gasPriceIsValid && isMinCapValid && isMinCapLessThanMaxSupply) {
if (tierStore.areTiersValid && gasPriceIsValid && isMinCapValid) {
const { reservedTokenStore, deploymentStore } = this.props
const tiersCount = tierStore.tiers.length
const reservedCount = reservedTokenStore.tokens.length
Expand Down

0 comments on commit 3008dd3

Please sign in to comment.