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

New Component: Switch Chain Modal #865

Open
0xTijan opened this issue Oct 27, 2022 · 7 comments
Open

New Component: Switch Chain Modal #865

0xTijan opened this issue Oct 27, 2022 · 7 comments
Labels
feature New feature or request web3

Comments

@0xTijan
Copy link
Collaborator

0xTijan commented Oct 27, 2022

Many dApps require a functionality for user to be able to switch chains. Even though this component wouldn't use Moralis it could still be a nice useful component for the web3uikit.

@0xTijan 0xTijan added the feature New feature or request label Oct 27, 2022
@BillyG83
Copy link
Contributor

@0xTijan can you outline how this would work?

@0xTijan
Copy link
Collaborator Author

0xTijan commented Oct 28, 2022

Hey Bill 👋

This would be a dropdown or modal (not sure yet) like in the 1inch or gnosis safe apps for example. When user selects a chain they want to switch to, Metamask pops up for user to approve that. The component would need to have at least 2 props:

  • currentChain
  • and chainList - array of wanted chains (EVM) to be in the dropdown or modal

But after looking at a dropdown component this new switch chain component maybe isn't needed at all? 😅

1inch example
image

Gnosis Safe example
image

@AbhinavMV
Copy link
Collaborator

It would have been a nice addition but since moralis servers are going to be deprecated soon i don't think adding this to web3 package is worth it sorry 😅
but we can add it to the new package once we have it ready in future what do you think?

@0xTijan
Copy link
Collaborator Author

0xTijan commented Oct 31, 2022

Yeah, makes sense 😃

@BillyG83
Copy link
Contributor

BillyG83 commented Nov 1, 2022

yeah i'm pretty close to adding the new web3 section @0xTijan , just some final things to workout about how to use NextJS pages with server side rendering in Storybook and make it useful to export to the end dev. Then this will be very nice. I do not think we need more UI for it, maybe just an array of chains would be passed and we would render the @AbhinavMV Select Component with the correct text and logos, then on change it could return the chain ID

@BillyG83 BillyG83 added the blocked this can't be completed label Nov 1, 2022
@BillyG83
Copy link
Contributor

BillyG83 commented Nov 1, 2022

i marked this blocked for now until i have the new slice ready, but you could actually add it to the Form section for now if you want @0xTijan

@BillyG83 BillyG83 added web3 and removed blocked this can't be completed labels Apr 13, 2023
@BillyG83
Copy link
Contributor

BillyG83 commented Apr 13, 2023

FYI @0xTijan i have added this to web3

I am using this tag to collect ideas for the next iteration of the web3 section of the kit and i think this is a great idea! 🤩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request web3
Projects
None yet
Development

No branches or pull requests

3 participants