From c66960a7edbc393216601d6b3aa020cf65716e9c Mon Sep 17 00:00:00 2001 From: devmerit <111743010+devmerit@users.noreply.github.com> Date: Wed, 5 Apr 2023 15:14:43 +0200 Subject: [PATCH] Need to increase priorityFees on Polygon Need more agressive priorityFees since april-23 otherwise transactions on Polygon got stuck (in MATIC it is about +0.01 to ~0.05 overall fee). You can reproduce that issue by signing any tx on Polygon DAO by Client. And comparing to manually set 'agressive' gas fee in Metamask (the last one will work). --- src/components/SignerPanel/SignerPanel.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/SignerPanel/SignerPanel.js b/src/components/SignerPanel/SignerPanel.js index d6a71f62f..c05d68d35 100644 --- a/src/components/SignerPanel/SignerPanel.js +++ b/src/components/SignerPanel/SignerPanel.js @@ -25,6 +25,9 @@ import { isSignatureSuccess, } from './signer-statuses' +const { chainId } = useWallet() +const PRIORITY_FEE_MULTIPLIER = chainId===137 ? 1.3 : 1 // need more agressive priorityFees on Polygon + const INITIAL_STATE = { actionPaths: [], directPath: false, @@ -321,7 +324,7 @@ class SignerPanel extends React.PureComponent { const estimatedPriorityFee = await getPriorityFeeEstimation(walletWeb3) return { ...transaction, - maxPriorityFeePerGas: estimatedPriorityFee, + maxPriorityFeePerGas: estimatedPriorityFee * PRIORITY_FEE_MULTIPLIER, } }