Skip to content

Commit f4dd34e

Browse files
authored
fix: dont track send_tx on retries (#603)
1 parent d7a2297 commit f4dd34e

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

src/server/routes/transaction/syncRetry.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import { StatusCodes } from "http-status-codes";
55
import { prisma } from "../../../db/client";
66
import { updateTx } from "../../../db/transactions/updateTx";
77
import { getSdk } from "../../../utils/cache/getSdk";
8-
import { msSince } from "../../../utils/date";
98
import { parseTxError } from "../../../utils/errors";
10-
import { UsageEventTxActionEnum, reportUsage } from "../../../utils/usage";
119
import { createCustomError } from "../../middleware/error";
1210
import { standardResponseSchema } from "../../schemas/sharedApiSchemas";
1311
import { TransactionStatus } from "../../schemas/transaction";
@@ -148,21 +146,6 @@ export async function syncRetryTransaction(fastify: FastifyInstance) {
148146
sentAtBlockNumber: blockNumber,
149147
},
150148
});
151-
reportUsage([
152-
{
153-
action: UsageEventTxActionEnum.SendTx,
154-
input: {
155-
fromAddress: tx.fromAddress,
156-
toAddress: tx.toAddress,
157-
value: tx.value,
158-
chainId: tx.chainId,
159-
transactionHash,
160-
functionName: tx.functionName || undefined,
161-
extension: tx.extension || undefined,
162-
msSinceQueue: msSince(new Date(tx.queuedAt)),
163-
},
164-
},
165-
]);
166149

167150
reply.status(StatusCodes.OK).send({
168151
result: {

src/worker/tasks/retryTx.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -125,23 +125,6 @@ export const retryTx = async () => {
125125
},
126126
});
127127

128-
reportUsage([
129-
{
130-
input: {
131-
fromAddress: tx.fromAddress || undefined,
132-
toAddress: tx.toAddress || undefined,
133-
value: tx.value || undefined,
134-
chainId: tx.chainId,
135-
functionName: tx.functionName || undefined,
136-
extension: tx.extension || undefined,
137-
retryCount: tx.retryCount + 1,
138-
transactionHash: transactionResponse.hash || undefined,
139-
provider: provider.connection.url,
140-
},
141-
action: UsageEventTxActionEnum.SendTx,
142-
},
143-
]);
144-
145128
logger({
146129
service: "worker",
147130
level: "info",

0 commit comments

Comments
 (0)