From c2bfa579814b7dad6332c9692225fa96503282e8 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 5 Aug 2021 14:15:02 -0230 Subject: [PATCH] Allow max fee to be equal to max priority fee (#11778) --- ui/hooks/useGasFeeInputs.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ui/hooks/useGasFeeInputs.js b/ui/hooks/useGasFeeInputs.js index ae3837d9c..89a50118d 100644 --- a/ui/hooks/useGasFeeInputs.js +++ b/ui/hooks/useGasFeeInputs.js @@ -34,7 +34,6 @@ import { import { bnGreaterThan, bnLessThan, - bnGreaterThanEqualTo, bnLessThanEqualTo, } from '../helpers/utils/util'; import { GAS_FORM_ERRORS } from '../helpers/constants/gas'; @@ -429,9 +428,7 @@ export function useGasFeeInputs( if (networkAndAccountSupports1559) { if (bnLessThanEqualTo(maxPriorityFeePerGasToUse, 0)) { gasErrors.maxPriorityFee = GAS_FORM_ERRORS.MAX_PRIORITY_FEE_BELOW_MINIMUM; - } else if ( - bnGreaterThanEqualTo(maxPriorityFeePerGasToUse, maxFeePerGasToUse) - ) { + } else if (bnGreaterThan(maxPriorityFeePerGasToUse, maxFeePerGasToUse)) { gasErrors.maxFee = GAS_FORM_ERRORS.MAX_FEE_IMBALANCE; } } @@ -449,9 +446,7 @@ export function useGasFeeInputs( ) ) { gasWarnings.maxPriorityFee = GAS_FORM_ERRORS.MAX_PRIORITY_FEE_TOO_LOW; - } else if ( - bnGreaterThanEqualTo(maxPriorityFeePerGasToUse, maxFeePerGasToUse) - ) { + } else if (bnGreaterThan(maxPriorityFeePerGasToUse, maxFeePerGasToUse)) { gasErrors.maxFee = GAS_FORM_ERRORS.MAX_FEE_IMBALANCE; } else if ( gasFeeEstimates?.high &&