-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: query-key-factory doesn't pass options through #6168
Conversation
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
da7216f
to
3e11555
Compare
3e11555
to
ad8137d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…_swapperApi_getIsTradingActive
…ery_key_factory_shenanigans
081e94a
to
1ce9785
Compare
54d55b0
to
529ec09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few thoughts, though nothing blocking (except maybe that hardcoded thorchain swapper as commented).
Performed an app-wide smoke test and everything behaved as expected 👌
@woodenfurniture ty for the review! Circling back on each of the points:
We will absolutely want to implement that as a follow-up to align with savers, nice catch!
Also a nice catch - there may be exactly what we need to achieve this in v3.25.0 👀 https://github.com/TanStack/query/releases/tag/v3.25.0 to be added as a follow-up as well!
Indeed, also still needs to be implemented!
Also a nice catch 👀
We could definitely do one better to handle loading/errorred states, I'll dedicate a PR for these only! |
Description
See lukemorales/query-key-factory#83 for more context WRT the whys of this.
This PR:
enabled
,staleTime
etc) of react-queries are properly passed at consumer levelstaleTime
andgcTime
to match the freshness we expectinboundAddress: (assetId: AssetId): Promise<InboundAddressResponse>
now beinginboundAddresses: () => Promise<Result<InboundAddressResponse[], SwapErrorRight>>;
and the derivation of asset-specific inbound address being done by a selectorisTradingActive
in favor of deriving trading active frominboundAddresses
andmimir
queriesTo be tested:
inboundAddress
query is happy i.e signing is still happy for THORChain LPPull Request Type
Issue (if applicable)
Risk
Theoretically low as the guts of this PR is bringing react-query options at consumer time, though effectively high since the now correct (and some revisited) options being used may result in regressions, as well as the refactor of
isTradingActive
andinboundAddress
now beinginboundAddresses
+ selectors.Go through all the above while testing.
Testing
Engineering
Operations
Screenshots (if applicable)
Screen.Recording.2024-02-09.at.11.50.02.mov