web3.js
web3.js copied to clipboard
Docs: getTransaction documentation incorrect
Right here: https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransaction
It says:
web3.eth.getTransaction(transactionHash [, callback])
Then the example goes:
web3.eth.getTransaction(blockNumber, indexOfTransaction);
So:
blockNumber has to be transactionHash, and I don't even know where indexOfTransaction is coming from, it's used nowhere else and seems to be confused with the getTransactionFromBlock example.
(Also: someone should test this on testrpc, it returns null every time, see: https://github.com/ethereumjs/testrpc/issues/121)
(Update: geth also returns null)
Thanks, fixed the docs.