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
When I use the web3.js documentation for version 1.2.5.
If I try this example for isListening, I expect it to tell me to call web3.eth.net.isListening().then(console.log); instead of web3.eth.isListening().then(console.log); (i.e. .net is missing).
Also, I expect this example for getPeerCount() to tell me to call web3.eth.net.getPeerCount().then(console.log); instead of web3.eth.getPeerCount().then(console.log); (i.e. also missing .net)
Actual behavior
The above examples are missing .net in the call, so when a user copies the example they get an error like TypeError: web3.eth.isListening is not a function, since it should be web3.eth.net isListening instead
Expected behavior
When I use the web3.js documentation for version 1.2.5.
If I try this example for
isListening
, I expect it to tell me to callweb3.eth.net.isListening().then(console.log);
instead ofweb3.eth.isListening().then(console.log);
(i.e..net
is missing).Also, I expect this example for
getPeerCount()
to tell me to callweb3.eth.net.getPeerCount().then(console.log);
instead ofweb3.eth.getPeerCount().then(console.log);
(i.e. also missing.net
)Actual behavior
The above examples are missing
.net
in the call, so when a user copies the example they get an error likeTypeError: web3.eth.isListening is not a function
, since it should beweb3.eth.net isListening
insteadSteps to reproduce the behavior
View the docs at https://web3js.readthedocs.io/en/v1.2.5/web3-net.html, and try and implement an example.
Logs
Versions
Web3.js 1.2.5
Node 12.7.0
macOS
The text was updated successfully, but these errors were encountered: