WalletConnect / web3modal

A single Web3 provider solution for all Wallets

Home Page:https://web3modal.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unsupported chains pops up after SIWE signing

LucyTrump0x opened this issue · comments

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.