From e5ca74b96a10fb73015fa805fb548cae5b90850f Mon Sep 17 00:00:00 2001 From: mouseless <97399882+mouseless-eth@users.noreply.github.com> Date: Mon, 16 Sep 2024 01:05:27 +0400 Subject: [PATCH] add hedera checks --- src/handlers/gasPriceManager.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/handlers/gasPriceManager.ts b/src/handlers/gasPriceManager.ts index 3e9001b9..6ee0a061 100644 --- a/src/handlers/gasPriceManager.ts +++ b/src/handlers/gasPriceManager.ts @@ -557,9 +557,13 @@ export class GasPriceManager { } public async validateGasPrice(gasPrice: GasPriceParameters) { - const lowestMaxFeePerGas = await this.getMinMaxFeePerGas() - const lowestMaxPriorityFeePerGas = - await this.getMinMaxPriorityFeePerGas() + let lowestMaxFeePerGas = await this.getMinMaxFeePerGas() + let lowestMaxPriorityFeePerGas = await this.getMinMaxPriorityFeePerGas() + + if (this.chainType === "hedera") { + lowestMaxFeePerGas /= 10n ** 9n + lowestMaxPriorityFeePerGas /= 10n ** 9n + } if (gasPrice.maxFeePerGas < lowestMaxFeePerGas) { throw new RpcError(