truffle-box / react-box

Truffle, Webpack and React boilerplate.
https://truffle-box.github.io/
MIT License
736 stars 251 forks source link

Fix detection of web3 and use state variable #4

Closed rstormsf closed 7 years ago

rstormsf commented 7 years ago

with current state, it always injects web3, and it is not utilizing state variable for contract's change

OnlyOneJMJQ commented 7 years ago

Good catch! I'll make sure to add this to the other boxes as well. :+1:

I added your fix but didn't merge the PR to keep the hard-coded value of 5 in the index intro text. My thought is if someone's messing around and gets an unexpected state value, they'll see it should be 5 if they haven't changed the default.