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": {
|
"editGasMaxFeeTooltip": {
|
||||||
"message": "The max fee is the most you’ll pay (base fee + priority fee)."
|
"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": {
|
"editGasMaxPriorityFeeHigh": {
|
||||||
"message": "Max priority fee is higher than necessary. You may pay more than needed."
|
"message": "Max priority fee is higher than necessary. You may pay more than needed."
|
||||||
},
|
},
|
||||||
@ -677,9 +680,6 @@
|
|||||||
"editGasMaxPriorityFeeTooltip": {
|
"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"
|
"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": {
|
"editGasMedium": {
|
||||||
"message": "Medium"
|
"message": "Medium"
|
||||||
},
|
},
|
||||||
|
@ -17,8 +17,8 @@ export function getGasFormErrorText(type, t, { minimumGasLimit } = {}) {
|
|||||||
return t('editGasMaxPriorityFeeLow');
|
return t('editGasMaxPriorityFeeLow');
|
||||||
case GAS_FORM_ERRORS.MAX_FEE_TOO_LOW:
|
case GAS_FORM_ERRORS.MAX_FEE_TOO_LOW:
|
||||||
return t('editGasMaxFeeLow');
|
return t('editGasMaxFeeLow');
|
||||||
case GAS_FORM_ERRORS.MAX_PRIORITY_FEE_ZERO:
|
case GAS_FORM_ERRORS.MAX_PRIORITY_FEE_BELOW_MINIMUM:
|
||||||
return t('editGasMaxPriorityFeeZeroError');
|
return t('editGasMaxPriorityFeeBelowMinimum');
|
||||||
case GAS_FORM_ERRORS.MAX_PRIORITY_FEE_HIGH_WARNING:
|
case GAS_FORM_ERRORS.MAX_PRIORITY_FEE_HIGH_WARNING:
|
||||||
return t('editGasMaxPriorityFeeHigh');
|
return t('editGasMaxPriorityFeeHigh');
|
||||||
case GAS_FORM_ERRORS.MAX_FEE_HIGH_WARNING:
|
case GAS_FORM_ERRORS.MAX_FEE_HIGH_WARNING:
|
||||||
|
@ -390,8 +390,9 @@ export function useGasFeeInputs(
|
|||||||
|
|
||||||
switch (gasEstimateType) {
|
switch (gasEstimateType) {
|
||||||
case GAS_ESTIMATE_TYPES.FEE_MARKET:
|
case GAS_ESTIMATE_TYPES.FEE_MARKET:
|
||||||
if (maxPriorityFeePerGasToUse < 1) {
|
if (maxPriorityFeePerGasToUse <= 0) {
|
||||||
gasErrors.maxPriorityFee = GAS_FORM_ERRORS.MAX_PRIORITY_FEE_ZERO;
|
gasErrors.maxPriorityFee =
|
||||||
|
GAS_FORM_ERRORS.MAX_PRIORITY_FEE_BELOW_MINIMUM;
|
||||||
} else if (
|
} else if (
|
||||||
!isGasEstimatesLoading &&
|
!isGasEstimatesLoading &&
|
||||||
maxPriorityFeePerGasToUse <
|
maxPriorityFeePerGasToUse <
|
||||||
|
Loading…
x
Reference in New Issue
Block a user