mirror of https://github.com/embarklabs/embark.git
Merge pull request #1034 from embark-framework/chore/remove-interfaces-deploy
Hide interfaces in contract deployment page
This commit is contained in:
commit
8a4b5d3d5d
|
@ -42,7 +42,7 @@ const LayoutContract = ({contract, children, cardTitle}) => (
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle>
|
<CardTitle>
|
||||||
<span className={orderClassName(contract.address)}>{contract.index + 1}</span>
|
<span className={orderClassName(contract.address)}>{contract.deployIndex + 1}</span>
|
||||||
{cardTitle}
|
{cardTitle}
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
@ -55,7 +55,7 @@ const LayoutContract = ({contract, children, cardTitle}) => (
|
||||||
LayoutContract.propTypes = {
|
LayoutContract.propTypes = {
|
||||||
contract: PropTypes.object,
|
contract: PropTypes.object,
|
||||||
children: PropTypes.array,
|
children: PropTypes.array,
|
||||||
cardTitle: PropTypes.string
|
cardTitle: PropTypes.object
|
||||||
};
|
};
|
||||||
|
|
||||||
const DeploymentResult = ({deployment}) => {
|
const DeploymentResult = ({deployment}) => {
|
||||||
|
@ -81,7 +81,7 @@ const DeploymentResult = ({deployment}) => {
|
||||||
|
|
||||||
DeploymentResult.propTypes = {
|
DeploymentResult.propTypes = {
|
||||||
deployment: PropTypes.object
|
deployment: PropTypes.object
|
||||||
}
|
};
|
||||||
|
|
||||||
const GasEstimateResult = ({gasEstimate}) => {
|
const GasEstimateResult = ({gasEstimate}) => {
|
||||||
if (gasEstimate.running) {
|
if (gasEstimate.running) {
|
||||||
|
@ -244,7 +244,10 @@ const ContractsHeader = ({deploymentPipeline, updateDeploymentPipeline}) => (
|
||||||
);
|
);
|
||||||
|
|
||||||
ContractsHeader.propTypes = {
|
ContractsHeader.propTypes = {
|
||||||
deploymentPipeline: PropTypes.object,
|
deploymentPipeline: PropTypes.oneOfType([
|
||||||
|
PropTypes.object,
|
||||||
|
PropTypes.string
|
||||||
|
]),
|
||||||
updateDeploymentPipeline: PropTypes.func
|
updateDeploymentPipeline: PropTypes.func
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -262,13 +265,16 @@ const Contract = ({web3, contract, deploymentPipeline, web3Deploy, web3EstimateG
|
||||||
web3Deploy={web3Deploy}
|
web3Deploy={web3Deploy}
|
||||||
web3EstimateGas={web3EstimateGas}/>;
|
web3EstimateGas={web3EstimateGas}/>;
|
||||||
default:
|
default:
|
||||||
return <React.Fragment></React.Fragment>;
|
return <React.Fragment/>;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Contract.propTypes = {
|
Contract.propTypes = {
|
||||||
contract: PropTypes.object,
|
contract: PropTypes.object,
|
||||||
deploymentPipeline: PropTypes.object,
|
deploymentPipeline: PropTypes.oneOfType([
|
||||||
|
PropTypes.object,
|
||||||
|
PropTypes.string
|
||||||
|
]),
|
||||||
toggleContractOverview: PropTypes.func,
|
toggleContractOverview: PropTypes.func,
|
||||||
web3: PropTypes.object,
|
web3: PropTypes.object,
|
||||||
web3Deploy: PropTypes.func,
|
web3Deploy: PropTypes.func,
|
||||||
|
@ -299,13 +305,16 @@ class ContractsDeployment extends React.Component {
|
||||||
<Row>
|
<Row>
|
||||||
<Col>
|
<Col>
|
||||||
<ContractsHeader deploymentPipeline={this.props.deploymentPipeline}
|
<ContractsHeader deploymentPipeline={this.props.deploymentPipeline}
|
||||||
updateDeploymentPipeline={this.props.updateDeploymentPipeline}/>
|
updateDeploymentPipeline={this.props.updateDeploymentPipeline}/>
|
||||||
{this.props.contracts.sort((a, b) => a.index - b.index).map(contract => (
|
{this.props.contracts.filter(contract => contract.code || contract.deploy)
|
||||||
<Contract key={contract.index}
|
.sort((a, b) => a.index - b.index).map((contract, index) => {
|
||||||
contract={contract}
|
contract.deployIndex = index;
|
||||||
toggleContractOverview={(contract) => this.toggleContractOverview(contract)}
|
return (<Contract key={contract.deployIndex}
|
||||||
{...this.props} />
|
contract={contract}
|
||||||
))}
|
toggleContractOverview={(contract) => this.toggleContractOverview(contract)}
|
||||||
|
{...this.props} />);
|
||||||
|
}
|
||||||
|
)}
|
||||||
</Col>
|
</Col>
|
||||||
{this.isContractOverviewOpen() &&
|
{this.isContractOverviewOpen() &&
|
||||||
<Col xs={6} md={3}>
|
<Col xs={6} md={3}>
|
||||||
|
@ -322,9 +331,13 @@ class ContractsDeployment extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ContractsDeployment.propTypes = {
|
ContractsDeployment.propTypes = {
|
||||||
contracts: PropTypes.array,
|
contracts: PropTypes.array,
|
||||||
deploymentPipeline: PropTypes.string,
|
deploymentPipeline: PropTypes.oneOfType([
|
||||||
|
PropTypes.object,
|
||||||
|
PropTypes.string
|
||||||
|
]),
|
||||||
updateDeploymentPipeline: PropTypes.func,
|
updateDeploymentPipeline: PropTypes.func,
|
||||||
web3Deployments: PropTypes.object,
|
web3Deployments: PropTypes.object,
|
||||||
web3GasEstimates: PropTypes.object,
|
web3GasEstimates: PropTypes.object,
|
||||||
|
|
|
@ -46,7 +46,10 @@ function mapStateToProps(state) {
|
||||||
|
|
||||||
DeploymentContainer.propTypes = {
|
DeploymentContainer.propTypes = {
|
||||||
contracts: PropTypes.array,
|
contracts: PropTypes.array,
|
||||||
deploymentPipeline: PropTypes.object,
|
deploymentPipeline: PropTypes.oneOfType([
|
||||||
|
PropTypes.object,
|
||||||
|
PropTypes.string
|
||||||
|
]),
|
||||||
fetchContracts: PropTypes.func,
|
fetchContracts: PropTypes.func,
|
||||||
updateDeploymentPipeline: PropTypes.func,
|
updateDeploymentPipeline: PropTypes.func,
|
||||||
web3: PropTypes.object,
|
web3: PropTypes.object,
|
||||||
|
|
Loading…
Reference in New Issue