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

Please give a option to use custom Websocket RPC endpoint in react package #953

Closed
ronypk999 opened this issue Apr 28, 2024 · 1 comment
Closed

Comments

@ronypk999
Copy link

https://github.com/anza-xyz/wallet-adapter/blob/master/packages/core/react/src/ConnectionProvider.tsx

On this

Just like the custom RPC endpoint it would be great to have custom Websocket RPC endpoint.

@mcintyre94 mcintyre94 added enhancement New feature or request good first issue Good for newcomers labels May 9, 2024
@mcintyre94
Copy link
Collaborator

You can do this by passing a config parameter including wsEndpoint. The default value is {commitment: "confirmed"} so I'd suggest including that in your config object. For example:

<ConnectionProvider endpoint='...' config={{commitment: "confirmed", wsEndpoint: "..."}}

See https://solana-labs.github.io/solana-web3.js/types/ConnectionConfig.html

If you have any further questions please use https://solana.stackexchange.com

@mcintyre94 mcintyre94 removed enhancement New feature or request good first issue Good for newcomers labels May 9, 2024
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