mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Allow max priority fee to be below 1, and only require it to be greater than 0 (#11749)
This commit is contained in:
parent
61b965a8a2
commit
b9fb495c7b
@ -668,6 +668,9 @@
|
||||
"editGasMaxFeeTooltip": {
|
||||
"message": "The max fee is the most you’ll pay (base fee + priority fee)."
|
||||
},
|
||||
"editGasMaxPriorityFeeBelowMinimum": {
|
||||
"message": "Max priority fee must be greater than 0 GWEI"
|
||||
},
|
||||
"editGasMaxPriorityFeeHigh": {
|
||||
"message": "Max priority fee is higher than necessary. You may pay more than needed."
|
||||
},
|
||||
@ -677,9 +680,6 @@
|
||||
"editGasMaxPriorityFeeTooltip": {
|
||||
"message": "Max priority fee (aka “miner tip”) goes directly to miners and incentivizes them to prioritize your transaction. You’ll most often pay your max setting"
|
||||
},
|
||||
"editGasMaxPriorityFeeZeroError": {
|
||||
"message": "Max priority fee must be at least 1 GWEI"
|
||||
},
|
||||
"editGasMedium": {
|
||||
"message": "Medium"
|
||||
},
|
||||
|
@ -17,8 +17,8 @@ export function getGasFormErrorText(type, t, { minimumGasLimit } = {}) {
|
||||
return t('editGasMaxPriorityFeeLow');
|
||||
case GAS_FORM_ERRORS.MAX_FEE_TOO_LOW:
|
||||
return t('editGasMaxFeeLow');
|
||||
case GAS_FORM_ERRORS.MAX_PRIORITY_FEE_ZERO:
|
||||
return t('editGasMaxPriorityFeeZeroError');
|
||||
case GAS_FORM_ERRORS.MAX_PRIORITY_FEE_BELOW_MINIMUM:
|
||||
return t('editGasMaxPriorityFeeBelowMinimum');
|
||||
case GAS_FORM_ERRORS.MAX_PRIORITY_FEE_HIGH_WARNING:
|
||||
return t('editGasMaxPriorityFeeHigh');
|
||||
case GAS_FORM_ERRORS.MAX_FEE_HIGH_WARNING:
|
||||
|
@ -390,8 +390,9 @@ export function useGasFeeInputs(
|
||||
|
||||
switch (gasEstimateType) {
|
||||
case GAS_ESTIMATE_TYPES.FEE_MARKET:
|
||||
if (maxPriorityFeePerGasToUse < 1) {
|
||||
gasErrors.maxPriorityFee = GAS_FORM_ERRORS.MAX_PRIORITY_FEE_ZERO;
|
||||
if (maxPriorityFeePerGasToUse <= 0) {
|
||||
gasErrors.maxPriorityFee =
|
||||
GAS_FORM_ERRORS.MAX_PRIORITY_FEE_BELOW_MINIMUM;
|
||||
} else if (
|
||||
!isGasEstimatesLoading &&
|
||||
maxPriorityFeePerGasToUse <
|
||||
|
Loading…
x
Reference in New Issue
Block a user