From 6986e76adca1cf001c66f2a330827efc9e10f8bb Mon Sep 17 00:00:00 2001 From: David Walsh Date: Mon, 26 Jul 2021 09:17:23 -0500 Subject: [PATCH] EIP-1559 - Show advanced form controls by default when user has selected custom values or there are gas warnings/errors (#11590) --- .../app/edit-gas-display/edit-gas-display.component.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/components/app/edit-gas-display/edit-gas-display.component.js b/ui/components/app/edit-gas-display/edit-gas-display.component.js index 47c465d2c..9536df664 100644 --- a/ui/components/app/edit-gas-display/edit-gas-display.component.js +++ b/ui/components/app/edit-gas-display/edit-gas-display.component.js @@ -25,7 +25,6 @@ import { I18nContext } from '../../../contexts/i18n'; export default function EditGasDisplay({ mode = EDIT_GAS_MODES.MODIFY_IN_PLACE, - alwaysShowForm = false, showEducationButton = false, onEducationClick, transaction, @@ -59,6 +58,8 @@ export default function EditGasDisplay({ }) { const t = useContext(I18nContext); + const alwaysShowForm = !estimateToUse || hasGasErrors || false; + const requireDappAcknowledgement = Boolean( transaction?.dappSuggestedGasFees && !dappSuggestedGasFeeAcknowledged, ); @@ -216,7 +217,6 @@ export default function EditGasDisplay({ } EditGasDisplay.propTypes = { - alwaysShowForm: PropTypes.bool, mode: PropTypes.oneOf(Object.values(EDIT_GAS_MODES)), showEducationButton: PropTypes.bool, onEducationClick: PropTypes.func,