1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

set min gas fee 30 gwei on priority fees for polygon and mumbai as well

This commit is contained in:
Bogdan Fazakas 2023-05-30 14:35:24 +02:00
parent 543f71f7cd
commit 04deabccd3

View File

@ -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