web3-eth
web3-eth copied to clipboard
Fix exception when etherscan responds no status
An exception is thrown if etherscan's json response does not include the status
field, e.g. on
https://api.etherscan.io/api?module=proxy&action=eth_getTransactionByHash&txhash=0x087c822fc9b75bc4894df309cc18820f3d77659f0bc115a7035de39461a456a3
This PR first checks for the presence of the status
field before checking whether it's 1
Let me know if there is a better way to do this!