@@ -36,23 +36,27 @@ export const updateMinedUserOps = async () => {
3636 } ) ;
3737 const signer = sdk . getSigner ( ) as ERC4337EthersSigner ;
3838
39- const txHash = await signer . smartAccountAPI . getUserOpReceipt (
40- userOp . userOpHash ! ,
41- 3000 ,
42- ) ;
39+ const userOpReceipt =
40+ await signer . smartAccountAPI . getUserOpReceipt (
41+ signer . httpRpcClient ,
42+ userOp . userOpHash ! ,
43+ 3000 ,
44+ ) ;
4345
44- if ( ! txHash ) {
46+ if ( ! userOpReceipt ) {
4547 // If no receipt was received, return undefined to filter out tx
4648 return undefined ;
4749 }
4850 const _sdk = await getSdk ( {
4951 chainId : parseInt ( userOp . chainId ! ) ,
5052 } ) ;
5153
52- const tx = await signer . provider ! . getTransaction ( txHash ) ;
54+ const tx = await signer . provider ! . getTransaction (
55+ userOpReceipt . transactionHash ,
56+ ) ;
5357 const txReceipt = await _sdk
5458 . getProvider ( )
55- . getTransactionReceipt ( txHash ) ;
59+ . getTransactionReceipt ( tx . hash ) ;
5660 const minedAt = new Date (
5761 (
5862 await getBlock ( {
@@ -67,7 +71,7 @@ export const updateMinedUserOps = async () => {
6771 blockNumber : tx . blockNumber ! ,
6872 minedAt,
6973 onChainTxStatus : txReceipt . status ,
70- transactionHash : txHash ,
74+ transactionHash : txReceipt . transactionHash ,
7175 transactionType : tx . type ,
7276 gasLimit : tx . gasLimit . toString ( ) ,
7377 maxFeePerGas : tx . maxFeePerGas ?. toString ( ) ,
0 commit comments