anza-xyz/wallet-adapter

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

ronypk999 opened this issue · 1 comments

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.

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