You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>constWeb3=require("web3")>letweb3=newWeb3("https://mainnet.infura.io")>web3.eth.net.getId().then(console.log)63// should be 1>web3.eth.net.getNetworkType().then(console.log)"private"// should be "main"
Versions
web3.js 1.0.0-beta.38 and 1.0.0-beta.39
The text was updated successfully, but these errors were encountered:
Expected behavior
web3.eth.net.getId()
should callnet_version
and return the current network id.https://github.com/ethereum/web3.js/blob/1d9f6c0889c7f551b4ec1041cece0d50bc3ff2c8/packages/web3-net/src/index.js#L38-L43
Actual behavior
From 1.0.0-beta.38 onwards,
web3.eth.net.getId
callseth_protocolVersion
and returns the current ethereum protocol version.https://github.com/ethereum/web3.js/blob/10face700362d124bc877ba6ea1390bde8364447/packages/web3-core-method/src/methods/network/VersionMethod.js#L25-L34
Steps to reproduce the behavior
Versions
web3.js
1.0.0-beta.38
and1.0.0-beta.39
The text was updated successfully, but these errors were encountered: