diff --git a/package.json b/package.json index 461a4c2..ac11b70 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "compile": "npm run compile:sol && npm run compile:js", "lint": "eslint src", "start": "node scripts/start.js", + "ropsten": "REACT_APP_NETWORK=ropsten node scripts/start.js", "build": "node scripts/build.js" }, "repository": { diff --git a/src/components/projects/FundProject.jsx b/src/components/projects/FundProject.jsx index 4e57df1..bd56b14 100644 --- a/src/components/projects/FundProject.jsx +++ b/src/components/projects/FundProject.jsx @@ -181,7 +181,7 @@ function FundProject({ classes, match, history }) { useEffect(() => { stopPolling() - }, [data.profile]) + }, [data]) if (loading) return if (error) return
{`Error! ${error.message}`}
diff --git a/src/dapp.js b/src/dapp.js index 8de537a..0cf77ba 100644 --- a/src/dapp.js +++ b/src/dapp.js @@ -1,4 +1,5 @@ /*global web3*/ +/*global process*/ import React from 'react' import { HashRouter as Router } from 'react-router-dom' import EmbarkJS from './embarkArtifacts/embarkjs' @@ -31,9 +32,8 @@ class App extends React.Component { }; componentDidMount(){ - getNetworkType().then(async network => { - this.setGraphClient(network) - }) + const network = process.env.REACT_APP_NETWORK || 'ropsten' + this.setGraphClient(network) this.getAndSetPrices() EmbarkJS.onReady(async (err) => {