EIP-1559 - Ensure form always displays when there are errors (#11787)

feature/default_network_editable
David Walsh 3 years ago committed by GitHub
parent 751534e665
commit 1b1d039310
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      ui/components/app/edit-gas-display/edit-gas-display.component.js

@ -77,7 +77,7 @@ export default function EditGasDisplay({
); );
const [showAdvancedForm, setShowAdvancedForm] = useState( const [showAdvancedForm, setShowAdvancedForm] = useState(
!estimateToUse || hasGasErrors || !networkAndAccountSupport1559, !estimateToUse || !networkAndAccountSupport1559,
); );
const [hideRadioButtons, setHideRadioButtons] = useState( const [hideRadioButtons, setHideRadioButtons] = useState(
showAdvancedInlineGasIfPossible, showAdvancedInlineGasIfPossible,
@ -241,7 +241,9 @@ export default function EditGasDisplay({
</button> </button>
)} )}
{!requireDappAcknowledgement && {!requireDappAcknowledgement &&
(showAdvancedForm || showAdvancedInlineGasIfPossible) && ( (showAdvancedForm ||
hasGasErrors ||
showAdvancedInlineGasIfPossible) && (
<AdvancedGasControls <AdvancedGasControls
gasEstimateType={gasEstimateType} gasEstimateType={gasEstimateType}
isGasEstimatesLoading={isGasEstimatesLoading} isGasEstimatesLoading={isGasEstimatesLoading}

Loading…
Cancel
Save