Skip to content

Commit 28103be

Browse files
authored
Package Upsates (#497)
* Package Updates * added @google-cloud/kms
1 parent c16b97b commit 28103be

File tree

3 files changed

+608
-209
lines changed

3 files changed

+608
-209
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@
3535
"@fastify/swagger": "^8.9.0",
3636
"@fastify/type-provider-typebox": "^3.2.0",
3737
"@fastify/websocket": "^8.2.0",
38-
"@google-cloud/kms": "^4.0.0",
38+
"@google-cloud/kms": "^4.2.0",
3939
"@prisma/client": "5.2.0",
4040
"@sinclair/typebox": "^0.31.28",
4141
"@t3-oss/env-core": "^0.6.0",
4242
"@thirdweb-dev/auth": "^4.1.47",
4343
"@thirdweb-dev/chains": "^0.1.77",
4444
"@thirdweb-dev/sdk": "^4.0.49",
4545
"@thirdweb-dev/service-utils": "0.4.17",
46-
"@thirdweb-dev/wallets": "2.4.17",
46+
"@thirdweb-dev/wallets": "^2.5.2",
4747
"@types/base-64": "^1.0.2",
4848
"base-64": "^1.0.0",
4949
"body-parser": "^1.20.2",

src/worker/tasks/updateMinedUserOps.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,27 @@ export const updateMinedUserOps = async () => {
3434
});
3535
const signer = sdk.getSigner() as ERC4337EthersSigner;
3636

37-
const txHash = await signer.smartAccountAPI.getUserOpReceipt(
38-
userOp.userOpHash!,
39-
3000,
40-
);
37+
const userOpReceipt =
38+
await signer.smartAccountAPI.getUserOpReceipt(
39+
signer.httpRpcClient,
40+
userOp.userOpHash!,
41+
3000,
42+
);
4143

42-
if (!txHash) {
44+
if (!userOpReceipt) {
4345
// If no receipt was received, return undefined to filter out tx
4446
return undefined;
4547
}
4648
const _sdk = await getSdk({
4749
chainId: parseInt(userOp.chainId!),
4850
});
4951

50-
const tx = await signer.provider!.getTransaction(txHash);
52+
const tx = await signer.provider!.getTransaction(
53+
userOpReceipt.transactionHash,
54+
);
5155
const txReceipt = await _sdk
5256
.getProvider()
53-
.getTransactionReceipt(txHash);
57+
.getTransactionReceipt(tx.hash);
5458
const minedAt = new Date(
5559
(
5660
await getBlock({
@@ -65,7 +69,7 @@ export const updateMinedUserOps = async () => {
6569
blockNumber: tx.blockNumber!,
6670
minedAt,
6771
onChainTxStatus: txReceipt.status,
68-
transactionHash: txHash,
72+
transactionHash: tx.hash,
6973
transactionType: tx.type,
7074
gasLimit: tx.gasLimit.toString(),
7175
maxFeePerGas: tx.maxFeePerGas?.toString(),

0 commit comments

Comments
 (0)