-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Description
- Version: 5.20.0
- Python: 3.9
- OS: osx
What was wrong?
Hey! I've got an issue with to_hex and wait_for_transaction_receipt functions.
I use the function as in the example
web3.eth.wait_for_transaction_receipt('0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060')
But if the tx doesn't get mined within timeout it raises the exception which uses to_hex function with a tx hash passed as a parameter (which is a string in an example). It raises another exception as a string cannot be passed to to_hex function.
Unsupported type: The primitive argument must be one of: bytes,bytearray, int or bool and not str
How can it be fixed?
Allow to_hex accept a string or convert it to bytes in wait_for_transaction_receipt function.