saddle-finance / saddle-frontend

An open source UI for saddle.finance 🤠
https://saddle.exchange
54 stars 58 forks source link

Dynamic Withdraw/Deposit routing w\o mapping Pools #1200

Closed arthur-zhuk closed 2 years ago

arthur-zhuk commented 2 years ago

A better way to do this might just be to have a dynamic route instead of an explicit one. That way instead of creating one route for each pool (and thus having to wait for all pools to be loaded, which might not work), we just have two routes for deposit and withdraw.

<Route exact path="/pools/:poolName/deposit" ...>

Then use match.params.poolName in the child to get pool data.

_Originally posted by @hammeiam in https://github.com/saddle-finance/saddle-frontend/pull/1184#discussion_r927953627_