Skip to content

Commit

Permalink
Retry Fix (#170)
Browse files Browse the repository at this point in the history
* retry fixed

* reetry query updated
  • Loading branch information
farhanW3 authored Sep 27, 2023
1 parent 33f0576 commit 8bbab0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/db/transactions/getTxToRetry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Transactions } from "@prisma/client";
import type { PrismaTransaction } from "../../schema/prisma";
import { env } from "../../utils/env";
import { getPrismaWithPostgresTx } from "../client";

interface GetTxToRetryParams {
Expand All @@ -25,7 +26,7 @@ WHERE
AND "minedAt" IS NULL
AND "errorMessage" IS NULL
AND "transactionHash" IS NOT NULL
AND "retryCount" < 3
AND "retryCount" < ${env.MAX_RETRIES_FOR_TX}
ORDER BY
"sentAt"
ASC
Expand Down
2 changes: 1 addition & 1 deletion src/worker/tasks/retryTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const retryTx = async () => {
return;
}

const receipt = sdk
const receipt = await sdk
.getProvider()
.getTransactionReceipt(tx.transactionHash!);

Expand Down

0 comments on commit 8bbab0b

Please sign in to comment.