-
Notifications
You must be signed in to change notification settings - Fork 18
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
Improve RPC selection logic #5
Comments
+1 |
Not sure how good this applies here but a nice detail pjs apps does, is randomizing rpc endpoints. It's a nice detail to prevent overloading a single rpc and centralization through a single rpc provider. Screen.Recording.2024-02-15.at.10.43.51.mov |
|
The only problem I see with passing an array of strings to the |
When I had this issue described in #73 I've searched the parameters and docs of pjs but I wasn't able to find a feature like this. I know that pjs tries to reconnect if the connection drops or attempts to initialize it again, however it does not offer a way to specify more than a single provider. |
Currently, the RPC selection is too simple. It picks the first item in the
rpcUrls
array of aSubstrateChain
(see https://github.com/scio-labs/use-inkathon/blob/main/src/provider.tsx#L82) and creates aWsProvider
object (which even fails if the provided url is not a websocket).The text was updated successfully, but these errors were encountered: