diff --git a/ui/hooks/useGasFeeInputs.js b/ui/hooks/useGasFeeInputs.js index 7c3195fcd..6ca6da030 100644 --- a/ui/hooks/useGasFeeInputs.js +++ b/ui/hooks/useGasFeeInputs.js @@ -90,11 +90,12 @@ function getGasFeeEstimate( gasFeeEstimates, gasEstimateType, estimateToUse, + fallback = '0', ) { if (gasEstimateType === GAS_ESTIMATE_TYPES.FEE_MARKET) { - return gasFeeEstimates?.[estimateToUse]?.[field] ?? '0'; + return gasFeeEstimates?.[estimateToUse]?.[field] ?? String(fallback); } - return '0'; + return String(fallback); } /** @@ -280,6 +281,7 @@ export function useGasFeeInputs( gasFeeEstimates, gasEstimateType, estimateToUse, + initialMaxFeePerGas, ); const maxPriorityFeePerGasToUse = @@ -289,6 +291,7 @@ export function useGasFeeInputs( gasFeeEstimates, gasEstimateType, estimateToUse, + initialMaxPriorityFeePerGas, ); const [initialGasPriceEstimates] = useState(gasFeeEstimates);