mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Allow max fee to be equal to max priority fee (#11778)
This commit is contained in:
parent
24d6456aaf
commit
e9ef3b168a
@ -34,7 +34,6 @@ import {
|
|||||||
import {
|
import {
|
||||||
bnGreaterThan,
|
bnGreaterThan,
|
||||||
bnLessThan,
|
bnLessThan,
|
||||||
bnGreaterThanEqualTo,
|
|
||||||
bnLessThanEqualTo,
|
bnLessThanEqualTo,
|
||||||
} from '../helpers/utils/util';
|
} from '../helpers/utils/util';
|
||||||
import { GAS_FORM_ERRORS } from '../helpers/constants/gas';
|
import { GAS_FORM_ERRORS } from '../helpers/constants/gas';
|
||||||
@ -429,9 +428,7 @@ export function useGasFeeInputs(
|
|||||||
if (networkAndAccountSupports1559) {
|
if (networkAndAccountSupports1559) {
|
||||||
if (bnLessThanEqualTo(maxPriorityFeePerGasToUse, 0)) {
|
if (bnLessThanEqualTo(maxPriorityFeePerGasToUse, 0)) {
|
||||||
gasErrors.maxPriorityFee = GAS_FORM_ERRORS.MAX_PRIORITY_FEE_BELOW_MINIMUM;
|
gasErrors.maxPriorityFee = GAS_FORM_ERRORS.MAX_PRIORITY_FEE_BELOW_MINIMUM;
|
||||||
} else if (
|
} else if (bnGreaterThan(maxPriorityFeePerGasToUse, maxFeePerGasToUse)) {
|
||||||
bnGreaterThanEqualTo(maxPriorityFeePerGasToUse, maxFeePerGasToUse)
|
|
||||||
) {
|
|
||||||
gasErrors.maxFee = GAS_FORM_ERRORS.MAX_FEE_IMBALANCE;
|
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;
|
gasWarnings.maxPriorityFee = GAS_FORM_ERRORS.MAX_PRIORITY_FEE_TOO_LOW;
|
||||||
} else if (
|
} else if (bnGreaterThan(maxPriorityFeePerGasToUse, maxFeePerGasToUse)) {
|
||||||
bnGreaterThanEqualTo(maxPriorityFeePerGasToUse, maxFeePerGasToUse)
|
|
||||||
) {
|
|
||||||
gasErrors.maxFee = GAS_FORM_ERRORS.MAX_FEE_IMBALANCE;
|
gasErrors.maxFee = GAS_FORM_ERRORS.MAX_FEE_IMBALANCE;
|
||||||
} else if (
|
} else if (
|
||||||
gasFeeEstimates?.high &&
|
gasFeeEstimates?.high &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user