Skip to content

Commit 9dc6e3f

Browse files
authored
Remove simulation on queueTx (#352)
1 parent 6f9b809 commit 9dc6e3f

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/db/transactions/queueTx.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import type {
2-
DeployTransaction,
3-
Transaction,
4-
TransactionError,
5-
} from "@thirdweb-dev/sdk";
1+
import type { DeployTransaction, Transaction } from "@thirdweb-dev/sdk";
62
import { ERC4337EthersSigner } from "@thirdweb-dev/wallets/dist/declarations/src/evm/connectors/smart-wallet/lib/erc4337-signer";
73
import { BigNumber } from "ethers";
84
import type { ContractExtension } from "../../schema/extension";
@@ -28,18 +24,6 @@ export const queueTx = async ({
2824
deployedContractAddress,
2925
deployedContractType,
3026
}: QueueTxParams) => {
31-
try {
32-
if (!deployedContractAddress) {
33-
await tx.simulate();
34-
}
35-
} catch (err: any) {
36-
const errorMessage =
37-
(err as TransactionError)?.reason || (err as any).message || err;
38-
throw new Error(
39-
`Transaction simulation failed with reason: ${errorMessage}`,
40-
);
41-
}
42-
4327
// TODO: We need a much safer way of detecting if the transaction should be a user operation
4428
const isUserOp = !!(tx.getSigner as ERC4337EthersSigner).erc4337provider;
4529
const txData = {

0 commit comments

Comments
 (0)