Uniswap / v2-sdk

🛠 An SDK for building applications on top of Uniswap V2
https://uniswap.org/docs/v2/SDK/getting-started
MIT License
428 stars 1.09k forks source link

Use default FACTORY_ADDRESS if the chain is not in the map #160

Closed mikeki closed 8 months ago

mikeki commented 8 months ago

Fix getAddress method

We made a change in #151 that now relies on a map of factory address, but the problem is that if we are trying to quote a chain that is not on that map, then we just error out.

This change is default to the previously unique factory_address when the chain of the token is not in the map