diff --git a/src/index.ts b/src/index.ts index 1100853..cb9af1c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -119,7 +119,7 @@ const deploymentBlock = Number(process.env.FACTORY_BLOCK_NUM) || 0 console.info(`Detected ${tcrs.length} TCRs`) console.info('Scanning them for pending requests and withdrawals...') let tcrCount = 1 - let nonce = txCount + 1 + let nonce = txCount for (let tcr of tcrs) { console.info(`Scanning ${tcrCount} of ${tcrs.length}`) diff --git a/src/utils/withdraw-rewards.ts b/src/utils/withdraw-rewards.ts index c6e4b8a..6d9dafe 100644 --- a/src/utils/withdraw-rewards.ts +++ b/src/utils/withdraw-rewards.ts @@ -30,7 +30,7 @@ export default async function withdrawRewardsRemoveWatchlist( // every round by a contributor, we avoid withdrawing // for the same contributor more than once by using a set. const done = new Set() - let nonce = (await signer.getTransactionCount()) + 1 + let nonce = (await signer.getTransactionCount()) for (let contributionEvent of contributionEvents) { const { values: { _contributor, itemID, _request } } = contributionEvent if (done.has(_contributor)) return