76
76
)
77
77
from web3 .exceptions import (
78
78
TimeExhausted ,
79
- TransactionNotFound ,
80
79
)
81
80
from web3 .iban import (
82
81
Iban ,
@@ -368,7 +367,7 @@ def modifyTransaction(
368
367
new_transaction = merge (current_transaction_params , transaction_params )
369
368
return replace_transaction (self .web3 , current_transaction , new_transaction )
370
369
371
- def sendTransaction (self , transaction : TxParams ) -> HexBytes :
370
+ def send_transaction_munger (self , transaction : TxParams ) -> Tuple [ TxParams ] :
372
371
# TODO: move to middleware
373
372
if 'from' not in transaction and is_checksum_address (self .defaultAccount ):
374
373
transaction = assoc (transaction , 'from' , self .defaultAccount )
@@ -380,11 +379,12 @@ def sendTransaction(self, transaction: TxParams) -> HexBytes:
380
379
'gas' ,
381
380
get_buffered_gas_estimate (self .web3 , transaction ),
382
381
)
382
+ return (transaction ,)
383
383
384
- return self . web3 . manager . request_blocking (
385
- RPC .eth_sendTransaction ,
386
- [ transaction ],
387
- )
384
+ sendTransaction : Method [ Callable [[ TxParams ], HexBytes ]] = Method (
385
+ RPC .eth_sendTransaction ,
386
+ mungers = [ send_transaction_munger ]
387
+ )
388
388
389
389
sendRawTransaction : Method [Callable [[Union [HexStr , bytes ]], HexBytes ]] = Method (
390
390
RPC .eth_sendRawTransaction ,
0 commit comments