WalletConnect / web3modal

A single Web3 provider solution for all Wallets
https://web3modal.com
Apache License 2.0
4.67k stars 1.28k forks source link

Unsupported chains pops up after SIWE signing #2180

Open LucyTrump0x opened 3 weeks ago

LucyTrump0x commented 3 weeks ago

What problem does this new feature solve?

What I mean is that this situation arises after integrating SiweConfig. The current issue is that the sign dialog pops up without checking if the chainId is supported. Moreover, there are no hooks or callbacks provided for customizing the sign, which leads to a situation where after signing, it checks for unsupported chains, prompts to switch chains, and then requires signing again. This is unreasonable and unfriendly.

Describe the solution you'd like

Before executing the Siwe signature, it is necessary to check if the chainId is in the chains list. If it is not in the list, prompt to switch the chain first, or automatically switch to the default chain before executing the signature.

linear[bot] commented 3 weeks ago

W3M-274 [feature]