How to switch connected wallet network?

I’ve followed the firebase node.js tutorial and connected the user but i need to check if the wallet is connected in the correct network (BNB for example) and, if not, switch to the BNB network.

Hi @EvandroAK

The option to switch networks varies with the wallet you are connected to. Example metamask has
a wallet_switchEthereumChain to switch the networks. This can be used to switch the networks to a different network like BNB if the network is available on metamask.
https://docs.metamask.io/wallet/reference/wallet_switchethereumchain/

Once the switch is successful Metamask will emit an network change events. You can track this event to know which chains the wallet is connected to.