web3-eth icon indicating copy to clipboard operation
web3-eth copied to clipboard

Fix exception when etherscan responds no status

Open qbonnard opened this issue 3 years ago • 0 comments

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!

qbonnard avatar Apr 05 '21 12:04 qbonnard