diff --git a/src/relayer/Relayer.ts b/src/relayer/Relayer.ts index 43e60e8da..85a09b43d 100644 --- a/src/relayer/Relayer.ts +++ b/src/relayer/Relayer.ts @@ -717,8 +717,6 @@ export class Relayer { .flat() .map(({ deposit }) => deposit); - this.fillLimits = this.computeFillLimits(); - this.logger.debug({ at: "Relayer::checkForUnfilledDepositsAndFill", message: `${allUnfilledDeposits.length} unfilled deposits found.`, @@ -727,6 +725,8 @@ export class Relayer { return txnReceipts; } + this.fillLimits = this.computeFillLimits(); + const lpFees = await this.batchComputeLpFees(allUnfilledDeposits); await sdkUtils.forEachAsync(Object.entries(unfilledDeposits), async ([chainId, _deposits]) => { if (_deposits.length === 0) { diff --git a/test/Relayer.BasicFill.ts b/test/Relayer.BasicFill.ts index a58121775..98b74eab5 100644 --- a/test/Relayer.BasicFill.ts +++ b/test/Relayer.BasicFill.ts @@ -503,7 +503,7 @@ describe("Relayer: Check for Unfilled Deposits and Fill", async function () { for (const receipts of Object.values(txnReceipts)) { expect((await receipts).length).to.equal(0); } - expect(spyLogIncludes(spy, -3, "due to insufficient deposit confirmations.")).to.be.true; + expect(spyLogIncludes(spy, -2, "due to insufficient deposit confirmations.")).to.be.true; expect(lastSpyLogIncludes(spy, "0 unfilled deposits found.")).to.be.true; });