Replies: 5 comments 1 reply
-
Copied from #1671 Here's why I think it's better UX to show it without wallet connected.
|
Beta Was this translation helpful? Give feedback.
-
@kosmoskey wagmi supports that
|
Beta Was this translation helpful? Give feedback.
-
Related PR #1709 |
Beta Was this translation helpful? Give feedback.
-
I have to disable other browser wallets so that they don't pop up without a request. |
Beta Was this translation helpful? Give feedback.
-
Continuing discussion from PR #1601
cc @kosmoskey
What would be benefits if it was implemented on RainbowKit side?
I think you (@kosmoskey) might have misunderstood a bit my usecase. I requested that feature so users can easily change "default chain" if wallet is not being connected - if it's connected then RainbowKit uses the chain selected by the user in his wallet (MetaMask or whatever they use) .
Here is a simple usecase example:
I have a website with farming pools on 2 chains - Ethereum and Polygon. Right now
getPublicClient()
returns the first chain defined inRainbowKitProvider
'schains
property so by default I fetch data from theEthereum
chain in this case. To fetch anything from the other supported chain on my website, I need to either ask suer to connect their wallet (so they have chain switcher available) or as you mentioned - create my own chain's switcher which is a lot effort to make it look similar etc.Possible solution:
Allow user's to switch chain before connecting wallet if there is more than 1 supported chain so that way
getPublicClient()
could return the chain selected by user on website instead of defaulting to the first one that was configured in an array.If possible,
const { chain } = useNetwork()
should also return the chain selected by user (defaulting to the first one that was configured), right now it'sunderfined
until connecting the wallet.Beta Was this translation helpful? Give feedback.
All reactions