diff --git a/embark-ui/src/components/GasStation.js b/embark-ui/src/components/GasStation.js index c7b20807..b94545d9 100644 --- a/embark-ui/src/components/GasStation.js +++ b/embark-ui/src/components/GasStation.js @@ -75,7 +75,7 @@ class GasStation extends Component { Gas Price Estimator (for Mainnet) - this.setState({copied: true})} title="Copy gas price to clipboard"> diff --git a/embark-ui/src/containers/ContractDeploymentContainer.js b/embark-ui/src/containers/ContractDeploymentContainer.js index 0af3e19e..58fae465 100644 --- a/embark-ui/src/containers/ContractDeploymentContainer.js +++ b/embark-ui/src/containers/ContractDeploymentContainer.js @@ -36,7 +36,6 @@ class ContractDeploymentContainer extends Component { render={({gasStats}) => ( )}/> - ); } @@ -58,6 +57,7 @@ ContractDeploymentContainer.propTypes = { contractFunctions: PropTypes.arrayOf(PropTypes.object), postContractDeploy: PropTypes.func, fetchContractProfile: PropTypes.func, + fetchEthGas: PropTypes.func, error: PropTypes.string }; diff --git a/embark-ui/src/containers/ContractFunctionsContainer.js b/embark-ui/src/containers/ContractFunctionsContainer.js index cf273c99..28221cc2 100644 --- a/embark-ui/src/containers/ContractFunctionsContainer.js +++ b/embark-ui/src/containers/ContractFunctionsContainer.js @@ -3,25 +3,39 @@ import {connect} from 'react-redux'; import PropTypes from 'prop-types'; import {withRouter} from 'react-router-dom'; -import {contractProfile as contractProfileAction, contractFunction as contractFunctionAction} from '../actions'; +import { + contractProfile as contractProfileAction, + contractFunction as contractFunctionAction, + ethGas as ethGasAction +} from '../actions'; import ContractFunctions from '../components/ContractFunctions'; import DataWrapper from "../components/DataWrapper"; -import {getContractProfile, getContractFunctions} from "../reducers/selectors"; +import GasStation from "../components/GasStation"; +import {getContractProfile, getContractFunctions, getGasStats} from "../reducers/selectors"; class ContractFunctionsContainer extends Component { componentDidMount() { this.props.fetchContractProfile(this.props.match.params.contractName); + this.props.fetchEthGas(); } render() { return ( - ( - - )} /> + + ( + + )}/> + + ( + + )}/> + ); } } @@ -30,6 +44,7 @@ function mapStateToProps(state, props) { return { contractProfile: getContractProfile(state, props.match.params.contractName), contractFunctions: getContractFunctions(state, props.match.params.contractName), + gasStats: getGasStats(state), error: state.errorMessage, loading: state.loading }; @@ -41,6 +56,7 @@ ContractFunctionsContainer.propTypes = { contractFunctions: PropTypes.arrayOf(PropTypes.object), postContractFunction: PropTypes.func, fetchContractProfile: PropTypes.func, + fetchEthGas: PropTypes.func, error: PropTypes.string }; @@ -48,6 +64,7 @@ export default withRouter(connect( mapStateToProps, { fetchContractProfile: contractProfileAction.request, - postContractFunction: contractFunctionAction.post + postContractFunction: contractFunctionAction.post, + fetchEthGas: ethGasAction.request } )(ContractFunctionsContainer));