Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Pull steps from actual available steps (#4848)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacogr authored Mar 10, 2017
1 parent ca96313 commit 8edee76
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions js/src/modals/DeployContract/deployContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,13 @@ class DeployContract extends Component {
render () {
const { step, deployError, rejected, inputs } = this.state;

const realStep = Object.keys(STEPS).findIndex((k) => k === step);
const realSteps = deployError || rejected
? null
: Object.keys(STEPS)
.filter((k) => k !== 'CONTRACT_PARAMETERS' || inputs.length > 0)
.map((k) => STEPS[k]);
const realStepKeys = deployError || rejected
? []
: Object.keys(STEPS).filter((k) => k !== 'CONTRACT_PARAMETERS' || inputs.length > 0);
const realStep = realStepKeys.findIndex((k) => k === step);
const realSteps = realStepKeys.length
? realStepKeys.map((k) => STEPS[k])
: null;

const title = realSteps
? null
Expand Down

0 comments on commit 8edee76

Please sign in to comment.