Skip to content

Commit

Permalink
Revert "(Fix) Prevent deployment if minCap isn't valid"
Browse files Browse the repository at this point in the history
  • Loading branch information
vbaranov committed Mar 15, 2018
1 parent a2b2ad2 commit b5fe488
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 b5fe488

Please sign in to comment.