set network using flag
this will ensure non web3 browsers can fetch data
This commit is contained in:
parent
dc7e787353
commit
aa044bdacc
|
@ -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": {
|
||||
|
|
|
@ -181,7 +181,7 @@ function FundProject({ classes, match, history }) {
|
|||
|
||||
useEffect(() => {
|
||||
stopPolling()
|
||||
}, [data.profile])
|
||||
}, [data])
|
||||
|
||||
if (loading) return <Loading />
|
||||
if (error) return <div>{`Error! ${error.message}`}</div>
|
||||
|
|
|
@ -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 => {
|
||||
const network = process.env.REACT_APP_NETWORK || 'ropsten'
|
||||
this.setGraphClient(network)
|
||||
})
|
||||
this.getAndSetPrices()
|
||||
|
||||
EmbarkJS.onReady(async (err) => {
|
||||
|
|
Loading…
Reference in New Issue