From 812a9d0dfa1b1872fb4e941de0fe34580fcec694 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Fri, 12 Oct 2018 13:49:35 +0100 Subject: [PATCH] Remove Dead Code --- embark-ui/src/components/ContractProfile.js | 58 ------------------- .../containers/ContractDeploymentContainer.js | 58 ------------------- .../containers/ContractProfileContainer.js | 45 -------------- 3 files changed, 161 deletions(-) delete mode 100644 embark-ui/src/components/ContractProfile.js delete mode 100644 embark-ui/src/containers/ContractDeploymentContainer.js delete mode 100644 embark-ui/src/containers/ContractProfileContainer.js diff --git a/embark-ui/src/components/ContractProfile.js b/embark-ui/src/components/ContractProfile.js deleted file mode 100644 index 02a302fb..00000000 --- a/embark-ui/src/components/ContractProfile.js +++ /dev/null @@ -1,58 +0,0 @@ -import PropTypes from "prop-types"; -import React from 'react'; -import { - Page, - Grid, - Card, - Table -} from "tabler-react"; - -const ContractProfile = ({contractProfile}) => ( - - - - - - - - Function - Payable - Mutability - Inputs - Outputs - Gas Estimates - - - - { - contractProfile.methods.map((method) => { - return ( - - {method.name} - {(method.payable === true).toString()} - {method.mutability} - {`(${method.inputs.map((x) => x.type).join(',')})`} - {`(${method.outputs.map((x) => x.type).join(',')})`} - {method.gasEstimates} - - ); - }) - } - -
-
-
-
-
-); - -ContractProfile.propTypes = { - contractProfile: PropTypes.object -}; - -export default ContractProfile; - diff --git a/embark-ui/src/containers/ContractDeploymentContainer.js b/embark-ui/src/containers/ContractDeploymentContainer.js deleted file mode 100644 index f6c264e5..00000000 --- a/embark-ui/src/containers/ContractDeploymentContainer.js +++ /dev/null @@ -1,58 +0,0 @@ -import React, {Component} from 'react'; -import {connect} from 'react-redux'; -import PropTypes from 'prop-types'; -import {withRouter} from 'react-router-dom'; - -import {contractProfile as contractProfileAction, contractDeploy as contractDeployAction} from '../actions'; -import ContractFunctions from '../components/ContractFunctions'; -import DataWrapper from "../components/DataWrapper"; -import GasStationContainer from "../containers/GasStationContainer"; -import {getContractProfile, getContractDeploys} from "../reducers/selectors"; - -class ContractDeploymentContainer extends Component { - componentDidMount() { - this.props.fetchContractProfile(this.props.match.params.contractName); - } - - render() { - return ( - ( - - - - - )}/> - ); - } -} - -function mapStateToProps(state, props) { - return { - contractProfile: getContractProfile(state, props.match.params.contractName), - contractDeploys: getContractDeploys(state, props.match.params.contractName), - error: state.errorMessage, - loading: state.loading - }; -} - -ContractDeploymentContainer.propTypes = { - match: PropTypes.object, - contractProfile: PropTypes.object, - contractFunctions: PropTypes.arrayOf(PropTypes.object), - postContractDeploy: PropTypes.func, - fetchContractProfile: PropTypes.func, - error: PropTypes.string -}; - -export default withRouter(connect( - mapStateToProps, - { - fetchContractProfile: contractProfileAction.request, - postContractDeploy: contractDeployAction.post - } -)(ContractDeploymentContainer)); diff --git a/embark-ui/src/containers/ContractProfileContainer.js b/embark-ui/src/containers/ContractProfileContainer.js deleted file mode 100644 index 723d2ae2..00000000 --- a/embark-ui/src/containers/ContractProfileContainer.js +++ /dev/null @@ -1,45 +0,0 @@ -import React, {Component} from 'react'; -import {connect} from 'react-redux'; -import PropTypes from 'prop-types'; -import {withRouter} from 'react-router-dom'; - -import {contractProfile as contractProfileAction} from '../actions'; -import ContractProfile from '../components/ContractProfile'; -import DataWrapper from "../components/DataWrapper"; -import {getContractProfile} from "../reducers/selectors"; - -class ContractProfileContainer extends Component { - componentDidMount() { - this.props.fetchContractProfile(this.props.match.params.contractName); - } - - render() { - return ( - ( - - )} /> - ); - } -} - -function mapStateToProps(state, props) { - return { - contractProfile: getContractProfile(state, props.match.params.contractName), - error: state.errorMessage, - loading: state.loading - }; -} - -ContractProfileContainer.propTypes = { - match: PropTypes.object, - contractProfile: PropTypes.object, - fetchContractProfile: PropTypes.func, - error: PropTypes.string -}; - -export default withRouter(connect( - mapStateToProps, - { - fetchContractProfile: contractProfileAction.request - } -)(ContractProfileContainer));