Open d-mooers opened 2 years ago
There seems to be a serialize token and serialize pair function, could we use this instead?
Uniswap has a pretty cool redux setup that caches the information related to each contract call. I think we should switch to something like this instead of having a reducer for all our pairs which I think is slowing us down a lot.
There is also a new version of the multicall contract which would be nice to change to
Is your feature request related to a problem? Please describe. Token objects are non-serializable, so when we store them in redux our site takes a performance hit. If we fix this we should see a significant performance improvement
Describe the solution you'd like We can refactor redux to only store token addresses, and then use the token addresses to grab the token object from a separate object. This will mainly involve work in the stableSwap hooks file.