diff --git a/cmd/dashboard/dashboard.js b/cmd/dashboard/dashboard.js
index e2155a1b6..05e6f75da 100644
--- a/cmd/dashboard/dashboard.js
+++ b/cmd/dashboard/dashboard.js
@@ -1,4 +1,3 @@
-let async = require('async');
let windowSize = require('window-size');
let Monitor = require('./monitor.js');
diff --git a/embark-ui/src/components/ContractsDeployment.js b/embark-ui/src/components/ContractsDeployment.js
index 1e8c35afd..70df96ed2 100644
--- a/embark-ui/src/components/ContractsDeployment.js
+++ b/embark-ui/src/components/ContractsDeployment.js
@@ -24,7 +24,7 @@ const orderClassName = (address) => {
'badge-success': address,
'badge-secondary': !address
});
-}
+};
// TODO add an ABI parser
const findConstructor = (abiDefinition) => abiDefinition.find(method => method.type === 'constructor');
@@ -35,56 +35,54 @@ const NoWeb3 = () => (
You are not connected to web3 yet
-)
+);
const LayoutContract = ({contract, children, cardTitle}) => (
-
- {contract.index + 1}
- {cardTitle}
-
+ {contract.index + 1}
+ {cardTitle}
{children}
-)
+);
const DeploymentResult = ({deployment}) => {
if (deployment.running) {
- return Deployment is in progress
+ return Deployment is in progress
;
}
if (deployment.error) {
- return Deployment failed: {deployment.error}
+ return Deployment failed: {deployment.error}
;
}
return (
Deployment succeed:
-
-
-
-
+
+
+
+
- )
-}
+ );
+};
const GasEstimateResult = ({gasEstimate}) => {
if (gasEstimate.running) {
- return Gas Estimation is in progresss
+ return Gas Estimation is in progresss
;
}
if (gasEstimate.error) {
- return Gas Estimation failed: {gasEstimate.error}
+ return Gas Estimation failed: {gasEstimate.error}
;
}
- return Gas Estimation succeed: {gasEstimate.gas}
-}
+ return Gas Estimation succeed: {gasEstimate.gas}
;
+};
class Web3Contract extends React.Component {
constructor(props) {
@@ -122,39 +120,40 @@ class Web3Contract extends React.Component {
{argumentsRequired &&
-
- Arguments:
- {abiConstructor.inputs.map(input => (
-
-
- this.handleOnChange(e, input.name)} />
-
- ))}
-
+
+ Arguments:
+ {abiConstructor.inputs.map(input => (
+
+
+ this.handleOnChange(e, input.name)}/>
+
+ ))}
+
}
- {!this.props.web3 && }
+ {!this.props.web3 && }
{this.props.web3 && !isInterface &&
-
-
-
-
+
+
+
+
}
{this.props.gasEstimate && }
-
+
{this.props.deployment && }
- )
+ );
}
}
@@ -167,13 +166,14 @@ const EmbarkContract = ({contract}) => (
}>
{contract.address && Arguments: {JSON.stringify(contract.args)}
}
{contract.transactionHash &&
-
- Transaction Hash: {contract.transactionHash}
- {contract.gas} gas at {contract.gasPrice} Wei, estimated cost: {contract.gas * contract.gasPrice} Wei
-
+
+ Transaction Hash: {contract.transactionHash}
+ {contract.gas} gas at {contract.gasPrice} Wei, estimated
+ cost: {contract.gas * contract.gasPrice} Wei
+
}
{contract.address && !contract.transactionHash &&
- Contract already deployed
+ Contract already deployed
}
);
@@ -185,12 +185,12 @@ const ContractsHeader = ({deploymentPipeline, updateDeploymentPipeline}) => (
Deploy using
-)
+);
const Contract = ({web3, contract, deploymentPipeline, web3Deploy, web3EstimateGas, web3Deployments, web3GasEstimates}) => {
const deployment = web3Deployments[contract.className];
const gasEstimate = web3GasEstimates[contract.className];
- switch(deploymentPipeline) {
+ switch (deploymentPipeline) {
case DEPLOYMENT_PIPELINES.embark:
- return ;
+ return ;
case DEPLOYMENT_PIPELINES.injectedWeb3:
- return ;
+ web3EstimateGas={web3EstimateGas}/>;
default:
return ;
}
-}
+};
const Contracts = (props) => (
-
- {props.contracts.sort((a, b) => a.index - b.index).map(contract => )}
+
+ {props.contracts.sort((a, b) => a.index - b.index).map(contract => )}
);
diff --git a/embark-ui/src/components/Layout.js b/embark-ui/src/components/Layout.js
index 15682182d..15005f7c6 100644
--- a/embark-ui/src/components/Layout.js
+++ b/embark-ui/src/components/Layout.js
@@ -115,7 +115,7 @@ class Layout extends React.Component {
{HEADER_NAV_ITEMS.map((item) => {
return (
-
+
{item.name}
diff --git a/embark-ui/src/components/Logs.js b/embark-ui/src/components/Logs.js
index 6b0e77016..be6173180 100644
--- a/embark-ui/src/components/Logs.js
+++ b/embark-ui/src/components/Logs.js
@@ -4,14 +4,22 @@ import autoscroll from 'autoscroll-react';
import "./Logs.css";
-const Logs = (props) => (
-
- {props.children}
-
-);
+// This NEEDS to be a component because of autoscroll
+class Logs extends React.Component {
+ render() {
+ return (
+
+ {this.props.children}
+
+ );
+ }
+}
Logs.propTypes = {
- children: PropTypes.object
+ children: PropTypes.oneOfType([
+ PropTypes.object,
+ PropTypes.array
+ ])
};
export default autoscroll(Logs);