From 7d5863423acbd542c36f36d7a9897e5a6af0449f Mon Sep 17 00:00:00 2001 From: mouseless <97399882+mouseless-eth@users.noreply.github.com> Date: Tue, 1 Oct 2024 19:10:56 +0100 Subject: [PATCH] don't save baseFee if set to zero --- src/handlers/gasPriceManager.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/handlers/gasPriceManager.ts b/src/handlers/gasPriceManager.ts index c8fe5325..fda81f13 100644 --- a/src/handlers/gasPriceManager.ts +++ b/src/handlers/gasPriceManager.ts @@ -50,6 +50,10 @@ class ArbitrumManager { } public saveL1BaseFee(baseFee: bigint) { + if (baseFee === 0n) { + return + } + const queue = this.queueL1BaseFee const last = queue.length > 0 ? queue[queue.length - 1] : null const timestamp = Date.now() @@ -66,6 +70,10 @@ class ArbitrumManager { } public saveL2BaseFee(baseFee: bigint) { + if (baseFee === 0n) { + return + } + const queue = this.queueL2BaseFee const last = queue.length > 0 ? queue[queue.length - 1] : null const timestamp = Date.now()