From 04deabccd3ffbc8d3620e42a8b1bc4a2d5019e54 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Tue, 30 May 2023 14:35:24 +0200 Subject: [PATCH] set min gas fee 30 gwei on priority fees for polygon and mumbai as well --- src/utils/ContractUtils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/ContractUtils.ts b/src/utils/ContractUtils.ts index bd5d738e..e9312486 100644 --- a/src/utils/ContractUtils.ts +++ b/src/utils/ContractUtils.ts @@ -130,7 +130,11 @@ export async function sendTx( ).toString() } overrides = { - maxPriorityFeePerGas: aggressiveFeePriorityFeePerGas, + maxPriorityFeePerGas: + (chainId === MUMBAI_NETWORK_ID || chainId === POLYGON_NETWORK_ID) && + Number(aggressiveFeePriorityFeePerGas) < MIN_GAS_FEE_POLYGON + ? MIN_GAS_FEE_POLYGON + : Number(aggressiveFeePriorityFeePerGas), maxFeePerGas: (chainId === MUMBAI_NETWORK_ID || chainId === POLYGON_NETWORK_ID) && Number(aggressiveFeePerGas) < MIN_GAS_FEE_POLYGON