starknet-react
starknet-react copied to clipboard
Check user connected network after connecting wallet
At the moment there seems to be no support in checking which network the user is connected to (e.g. Goeril or mainnet), i.e. the chainId
.
It would be nice if we could possibly add some new features (e.g. hooks) for checking this - similar to what we have for chainId
in wagmi for EVM chains.
This is crucial because when mainnet launch we would not want the users to sign the message on the wrong network to cause any inconvenience or financial loss.
I agree with this. The hook should also listen for network changed events on the wallet to keep the current network updated.
@clementjuventin is going to work on this contribution
Is it still open ? If yes can I work on it ?
It seams like I did it https://github.com/apibara/starknet-react/pull/167. However I see that there were some unmerged commits. As the repo was going through some big refactors I assumed it had been done manually.
Yep, forgot to close this issue when I merged your PR manually.