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

Dynamic Node endpoint #5

Closed
statictype opened this issue Jun 9, 2021 · 1 comment · Fixed by #196
Closed

Dynamic Node endpoint #5

statictype opened this issue Jun 9, 2021 · 1 comment · Fixed by #196

Comments

@statictype
Copy link
Contributor

The app should be able to switch between Canvas Test or a local node (ws://127.0.0.1:9944) from a dropdown.
Currently the app connects to a node via a connect function that lives in CanvasContext.
This function uses the “socket” property on the AppState obj that is currently hardcoded to “ws://127.0.0.1:9944”
Create a function in CanvasContext that modifies the socket property and can be called by the dropdown

The app should also be able to connect to a node rpc passed in the url
For example:
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fcanvas-rpc.parity.io#/explorer

Possible implementation here https://github.com/substrate-developer-hub/substrate-front-end-template/blob/f9840705c9571b1bc92dc6181e6d44d093ee9fd5/src/substrate-lib/SubstrateContext.js#L12

@statictype
Copy link
Contributor Author

To be future proof, we should consider implementing this with Substrate Connect

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants