@@ -36,23 +36,27 @@ export const updateMinedUserOps = async () => {
36
36
} ) ;
37
37
const signer = sdk . getSigner ( ) as ERC4337EthersSigner ;
38
38
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
+ ) ;
43
45
44
- if ( ! txHash ) {
46
+ if ( ! userOpReceipt ) {
45
47
// If no receipt was received, return undefined to filter out tx
46
48
return undefined ;
47
49
}
48
50
const _sdk = await getSdk ( {
49
51
chainId : parseInt ( userOp . chainId ! ) ,
50
52
} ) ;
51
53
52
- const tx = await signer . provider ! . getTransaction ( txHash ) ;
54
+ const tx = await signer . provider ! . getTransaction (
55
+ userOpReceipt . transactionHash ,
56
+ ) ;
53
57
const txReceipt = await _sdk
54
58
. getProvider ( )
55
- . getTransactionReceipt ( txHash ) ;
59
+ . getTransactionReceipt ( tx . hash ) ;
56
60
const minedAt = new Date (
57
61
(
58
62
await getBlock ( {
@@ -67,7 +71,7 @@ export const updateMinedUserOps = async () => {
67
71
blockNumber : tx . blockNumber ! ,
68
72
minedAt,
69
73
onChainTxStatus : txReceipt . status ,
70
- transactionHash : txHash ,
74
+ transactionHash : txReceipt . transactionHash ,
71
75
transactionType : tx . type ,
72
76
gasLimit : tx . gasLimit . toString ( ) ,
73
77
maxFeePerGas : tx . maxFeePerGas ?. toString ( ) ,
0 commit comments