Skip to content
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

Price fetching strategy update #636

Merged
merged 2 commits into from
Dec 5, 2024
Merged

Price fetching strategy update #636

merged 2 commits into from
Dec 5, 2024

Conversation

bpierre
Copy link
Contributor

@bpierre bpierre commented Dec 4, 2024

This aims to unify the price fetching strategy with the rest of the data fetching hooks, by relying on TanStack Query rather than using an internal provider.

  • Support setting a CoinGecko API key (demo or pro).
  • Refactor usePrice() and its callers to return UseQueryResult.
  • Remove the <Price> provider (relying on the TanStack Query cache instead).
  • Remove the possibility to update prices in demo mode (UpdatePrices.tsx).
  • Remove the random price variations in demo mode.
  • Move PRICE_REFRESH_INTERVAL into constants.ts.

This aims to unify the price fetching strategy with the rest of the data
fetching hooks, by relying on TanStack Query rather than using an
internal provider.

- Support setting a CoinGecko API key (demo or pro).
- Refactor usePrice() and its callers to return UseQueryResult.
- Remove the <Price> provider (relying on the TanStack Query cache instead).
- Remove the possibility to update prices in demo mode (UpdatePrices.tsx).
- Remove the random price variations in demo mode.
- Move PRICE_REFRESH_INTERVAL into constants.ts.
@bpierre bpierre merged commit ec15af8 into next Dec 5, 2024
@bpierre bpierre deleted the use-price-as-use-query branch December 5, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant