[Archive] How do I switch networks in torus wallet?

:classical_building: Archived Content from Web3Auth Community

This topic was originally posted by githubdiscussions on 8/16/2022.
This content has been migrated from our previous community forum to preserve valuable discussions.


Is there a way to switch networks programmatically?

for example metamask has

await provider.request({
	method: 'wallet_switchEthereumChain',
	params: [{ chainId: "0x1" }]
});


Originally posted by: leon-do

Check the discussion at: https://github.com/orgs/Web3Auth/discussions/416

Answered my question:

https://docs.tor.us/wallet/api-reference/class#init
https://docs.tor.us/wallet/api-reference/ethereum-api#setprovider



Originally posted by: leon-do