Skip to content

Commit 2db68ac

Browse files
committed
Use Optional[float] for async wait_for_transaction_receipt()
1 parent f74dfa8 commit 2db68ac

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

newsfragments/3237.breaking.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Change the signature for the async version of ``wait_for_transaction_receipt()`` to use ``Optional[float]`` instead of ``float``.

web3/eth/async_eth.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,10 @@ async def get_transaction_receipt(self, transaction_hash: _Hash32) -> TxReceipt:
516516
return await self._transaction_receipt(transaction_hash)
517517

518518
async def wait_for_transaction_receipt(
519-
self, transaction_hash: _Hash32, timeout: float = 120, poll_latency: float = 0.1
519+
self,
520+
transaction_hash: _Hash32,
521+
timeout: Optional[float] = 120,
522+
poll_latency: float = 0.1,
520523
) -> TxReceipt:
521524
async def _wait_for_tx_receipt_with_timeout(
522525
_tx_hash: _Hash32, _poll_latency: float

0 commit comments

Comments
 (0)