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

PYTH_CONNECTION / IConfiguration.pythnetRpc / @pythnetwork/pyth-solana-receiver appear unnecessary #400

Closed
0xcryptovenom opened this issue Nov 2, 2024 · 1 comment

Comments

@0xcryptovenom
Copy link
Contributor

Follow-up of #399 & related to #396

  • PYTH_CONNECTION Solana RPC Connection
  • IConfiguration.pythnetRpc configuration key
  • @pythnetwork/pyth-solana-receiver

all appear unnecessary, as they're used in src/hooks/useWatchTokenPrices.ts to fetch prices for multiple tokens at 5 / 10 seconds intervals.

However, in src/components/pages/trading/TradingChart/streaming.ts, the Pyth Benchmarks HTTP streaming API is used directly.

There's an opportunity to expand the use of & improve this solution, which would allow to remove the Pyth-specific Solana Connection + config + 3rd party dependency, and consolidate the app's source of truth for token prices at the same time.

@0xcryptovenom
Copy link
Contributor Author

Alternatively, the Pyth Benchmarks API is kept just for the Trading View - as it appears necessary, but the Pyth Hermes Price Updates Stream API is used in lieu of the other Pyth components for the functionality of useWatchTokenPrices / tokenPrices reducer consumers.

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

No branches or pull requests

2 participants