-
Notifications
You must be signed in to change notification settings - Fork 101
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
Allow change network standalone widget #5306
base: develop
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
{!!hideNetworkSelector && | ||
standaloneMode !== false && | ||
account && | ||
!isChainIdUnsupported && | ||
userEthBalance && | ||
chainId && | ||
!isUpToLarge && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These conditions are getting out of hand.
How about a variable/fn to abstract it away?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot agree more
Summary
The widget is currently not showing the network selector. For dapp mode, is not a big deal, because the connection is handled by the dapp, and therefore, the responsibility of the network is there too.
However, in standalone mode, there's not currently a way to change network.
Screen.Recording.2025-01-16.at.21.07.11.mov
This PR does 2 things:
Adds the setting in the configurator
Replaces the ETH balance by the network selector
ETH can be seen already in the network selector, and we are short on space. Plus we are a "gassless" exchange, you shouldn't need Ether a lot :)
So I took the space of the ETH to show the network: