eth_networkVersion

window.bw.eth.networkVersion

The network number of the blockchain that you are connected to. This property is available for legacy purposes. It is recommended that modern dapps refer to the chainId property to determine what chain a user is connected to currently.

const networkVersion = window.bw.eth.networkVersion;
console.log(networkVersion);
// "1"
// Ethereum Mainnet's Network Version

Last updated