daistats
daistats copied to clipboard
Improved metamask
Overhaul to all of the metamask buttons to have a more reactive behavior.
- Restores the old
ethers.jsfunctionality for page display - Adds ConsenSys/react-metamask dependency
- Rewrite of { Heal, Burn, Flap } button handling to use MetaMask context
- Updates addresses.json to 1.0.2 with checksummed addresses
I don't like adding web3 if we're using ethers already. Is there a way to make this happen? Trying to minimize dependencies
Hmm, probably not in this PR. It's baked in to the https://github.com/ConsenSys/react-metamask dependency and is used within the context. In fact it requires this specific version of web3.
Looks like they're deprecating it in favor of web3-react, which is way overkill for daistats at the moment
https://github.com/ConsenSys/react-metamask#deprecated
Lol, yeah, I just noticed that they added the deprecation 3 days ago.
Let me think about this. This PR gives the buttons an entire lifecycle around the metamask state, which is nice. The current page still has some issues with metamask not being ready on load, so the provider doesn't get set.