You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently have THORChain LP opportunities as react-queries.
These have been implemented greenfield and not abstracted the same way other opportunities are.
This PR is twofold:
Move away from RTK to react-query for all opportunities, to benefit from the advanced caching, refetching, invalidation etc that react-query provides
Make the THORChain LP opportunities fit the opportunities shape. This means that the opportunities slice will have to support:
the notion of asymmetrical or symmetrical deposits
the notion of automagical network rebalancing, i.e deposit asymmetrical, but the pool becomes symmetrical under the hood
Things to consider in this spike to validate whether this is viable:
Can we keep selection performant with reselect? Since things aren't stored in the redux store when using react-query, derivation is typically done using the select method from queries, but nothing blocks us from using reselect here - instead of selecting from the store, it will select from the return data of queries. We could potentially abstract react-query selectors away as their own domain, and use different selectors for a same query, depending on our needs
Overview
We currently have THORChain LP opportunities as react-queries.
These have been implemented greenfield and not abstracted the same way other opportunities are.
This PR is twofold:
Things to consider in this spike to validate whether this is viable:
reselect
? Since things aren't stored in the redux store when usingreact-query
, derivation is typically done using theselect
method from queries, but nothing blocks us from usingreselect
here - instead of selecting from the store, it will select from the return data of queries. We could potentially abstract react-query selectors away as their own domain, and use different selectors for a same query, depending on our needsReferences and additional details
opportunitiesSlice
Acceptance Criteria
Need By Date
N/A
Screenshots/Mockups
No response
Estimated effort
No response
The text was updated successfully, but these errors were encountered: