-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Safe Wallet and Wallet Connect Not Working With Multiple Chains Configured #3027
Comments
A similar issue reported before wevm/references#469, and a fix for that wevm/references#470 |
@oxSaturn How I worked against this is, we have multiple chains on our app. But the chain is dependent on the slug in our case. So depending on the slug, I set a single chain in the chains in the wagmi config for the walletconnect connector. Feels like this needs some attention as its being complained about in multiple places! |
@oxSaturn the fix got rejected. A lot of wallets seems to be affected, from what I know this issue is causing Trust Wallet and Ledger to not connect to any network that is not first on the list of chains passed to I'm thinking about any workaround, but I see none, except asking user to select the network first in my app UI and then use the wallet with correct network selected when connecting if anyone has a solution or even workaround that'd be great |
+1 Seeing the same behavior with UniSwap wallet as well |
This issue has been locked since it has been closed for more than 14 days. If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest wagmi version. If you have any other comments you can create a new discussion. |
Is there an existing issue for this?
Package Version
1.4.2
Current Behavior
I have a numerous list of chains that I have configured with my Wagmi below. If I wish to connect to Goerli via wallet connect through gnosis safe wallet. If goerli is not the first chain in the list, wallet connect will not form a connection to the safe app.
Instead giving the following error
Error: Connection refused: This Safe Account is in Goerli but the Wallet Connect session proposal is not valid because it contains: 1) A required chain different than Goerli 2) Does not include Goerli between the optional chains 3) No EVM compatible chain is included
[
mainnetConfig,
goerli,
arbitrum,
arbitrumGoerli,
avalanche,
bsc,
bscTestnet,
fantom,
polygon,
sepolia,
cronos,
etc,
etcTestnet,
heco,
kava,
kavaTestnet,
pulseChain,
velas,
baseMainnet,
]
new WalletConnectConnector({
chains,
options: {
showQrModal: true,
projectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_KEY,
},
}),
Error in my localhost env
Error in Safe App Console Log
Expected Behavior
It should work with wallet connect connecting to safe, no matter how many chains are configured within my Wagmi Config and irrelevant of the order. Have seen similar posts to this, but none of them detail a true solution. Any info or solution on this would be greatly greatly appreciated.
Steps To Reproduce
No response
Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: