From 5de542898c9ecc503df333ad5965ba27b4e201cd Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Wed, 17 Aug 2022 13:42:45 +0300 Subject: [PATCH] use latest instead of pending for fee history --- src/utils/ContractUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/ContractUtils.ts b/src/utils/ContractUtils.ts index d58247b4..a8be9ff5 100644 --- a/src/utils/ContractUtils.ts +++ b/src/utils/ContractUtils.ts @@ -114,7 +114,7 @@ export async function sendTx( gas: estGas + 1 } try { - const feeHistory = await web3.eth.getFeeHistory(1, 'pending', [75]) + const feeHistory = await web3.eth.getFeeHistory(1, 'latest', [75]) let aggressiveFee = new BigNumber(feeHistory?.reward?.[0]?.[0]) if (this.config?.gasFeeMultiplier > 1) { aggressiveFee = aggressiveFee.multipliedBy(this.config?.gasFeeMultiplier)