web3-react icon indicating copy to clipboard operation
web3-react copied to clipboard

fix: make sure the initialization to throw an exception when there is no match url

Open nikli2009 opened this issue 1 year ago • 1 comments

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 : image

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.

nikli2009 avatar Dec 05 '22 06:12 nikli2009