Skip to content

Commit

Permalink
updates to help with better readability
Browse files Browse the repository at this point in the history
  • Loading branch information
farhanW3 committed Apr 19, 2024
1 parent 9891b06 commit 401e361
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/db/transactions/queueTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface QueueTxParams {
simulateTx?: boolean;
idempotencyKey?: string;
txOverrides?: {
gasLimit?: string;
gas?: string;
maxFeePerGas?: string;
maxPriorityFeePerGas?: string;
};
Expand Down
3 changes: 3 additions & 0 deletions src/db/transactions/queueTxRaw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type QueueTxRawParams = Omit<
pgtx?: PrismaTransaction;
simulateTx?: boolean;
idempotencyKey?: string;
gas?: string;
};

export const queueTxRaw = async ({
Expand Down Expand Up @@ -60,6 +61,8 @@ export const queueTxRaw = async ({
target: tx.target?.toLowerCase(),
signerAddress: tx.signerAddress?.toLowerCase(),
accountAddress: tx.accountAddress?.toLowerCase(),
gasLimit: tx.gas,
gas: undefined,
};

let txRow: Transactions;
Expand Down
4 changes: 0 additions & 4 deletions src/server/routes/contract/write/write.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ export async function writeToContract(fastify: FastifyInstance) {
maxPriorityFeePerGas: txOverrides?.maxPriorityFeePerGas,
});

const gasLimit = txOverrides?.gas;
delete txOverrides?.gas;

const queueId = await queueTx({
tx,
chainId,
Expand All @@ -103,7 +100,6 @@ export async function writeToContract(fastify: FastifyInstance) {
idempotencyKey,
txOverrides: {
...txOverrides,
gasLimit,
},
});

Expand Down

0 comments on commit 401e361

Please sign in to comment.