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

Change network #328

Closed
wants to merge 15 commits into from
Closed

Change network #328

wants to merge 15 commits into from

Conversation

tyirenkyi
Copy link
Contributor

@tyirenkyi tyirenkyi commented Feb 23, 2022

This PR aims to add the change network feature mentioned in #46.

What's been done:

  1. Modal for react-ui
  2. Custom Select component for react-ui
  3. Context and provider for react-ui modal
  4. Update ConnectionProvider to track endpoints and update connection

What's being worked on:

  1. Standalone button for switching networks without a wallet connection

@tyirenkyi tyirenkyi marked this pull request as draft February 24, 2022 11:06
@tyirenkyi
Copy link
Contributor Author

Check react-ui starter project on how to use the new NetworkModalProvider

@tyirenkyi tyirenkyi marked this pull request as ready for review February 27, 2022 17:29
@tyirenkyi tyirenkyi changed the title [WIP] Change network Change network Feb 27, 2022
@tyirenkyi
Copy link
Contributor Author

@jordansexton could you take a look at this PR?

@SvenDowideit
Copy link

@jordansexton and @tyirenkyi how close is this to being merged? We have a network selector in our app, and i'm trying to start using the wallet-adapter for it too, and this is the last weird sync area :D

@jordaaash
Copy link
Collaborator

Not at all close. I wouldn't count on it landing, and it's not a high priority. If you need network selection, better to implement in your app.

@SvenDowideit
Copy link

mmmm, darn :) thanks.

@jordaaash
Copy link
Collaborator

Closing as we probably won't implement this at the application or adapter level.

We will soon move away from requiring adapters for every wallet, and the new wallet standard will have a network param in the relevant methods.

@jordaaash jordaaash closed this Jun 27, 2022
@neelsomani
Copy link

Folks, could you point me to the new wallet standard? We have several applications deploying with custom RPCs, and while we could create a new standard so they can support this feature to change networks, we'd prefer to adopt what y'all already have in mind. It is cited as one of the most popular pain points for us.

It sounds like Backpack and Solflare are on board to implement whatever is needed on their end if we can surface the relevant information via the wallet adapter or however else.

@jordaaash
Copy link
Collaborator

@neelsomani https://github.com/solana-labs/wallet-standard/tree/master/packages/core/features is where this would likely go. Please open an issue on that repo before sending a PR though.

For context, Backpack currently implements this as window.backpack.connection which uses a web3.js Connection object. This is probably a higher level interface than we'd want to expose.

We've avoided dependency on web3.js across the Wallet Standard, using raw bytes everywhere instead of web3.js types. Also consider that web3.js is getting a planned rewrite.

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

Successfully merging this pull request may close these issues.

5 participants