web3-react
web3-react copied to clipboard
fix: make sure the initialization to throw an exception when there is no match url
A minor checking added to network initialization.
Context
Found this when launching Uniswap interface locally and chose the Evmos chain.
The original error I got is :
So I looked into it a bit and seems we have a assumption that urls
will not be empty which in fact it could be.
and 🤔 I reckon there is something we could do about it like :
- Exit early when conditions check fails
- Make sure the user of web3-react can capture this Unhandled Rejection with a more meaningful error name.
Plz let me know if this makes sense to you :D
Changes
- Add additional
urls
null check. - Add unit test for the edge case.