We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33f0576 commit 8bbab0bCopy full SHA for 8bbab0b
src/db/transactions/getTxToRetry.ts
@@ -1,5 +1,6 @@
1
import { Transactions } from "@prisma/client";
2
import type { PrismaTransaction } from "../../schema/prisma";
3
+import { env } from "../../utils/env";
4
import { getPrismaWithPostgresTx } from "../client";
5
6
interface GetTxToRetryParams {
@@ -25,7 +26,7 @@ WHERE
25
26
AND "minedAt" IS NULL
27
AND "errorMessage" IS NULL
28
AND "transactionHash" IS NOT NULL
- AND "retryCount" < 3
29
+ AND "retryCount" < ${env.MAX_RETRIES_FOR_TX}
30
ORDER BY
31
"sentAt"
32
ASC
src/worker/tasks/retryTx.ts
@@ -34,7 +34,7 @@ export const retryTx = async () => {
34
return;
35
}
36
37
- const receipt = sdk
+ const receipt = await sdk
38
.getProvider()
39
.getTransactionReceipt(tx.transactionHash!);
40
0 commit comments