mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
EIP-1559 - Show advanced form controls by default when user has selected custom values or there are gas warnings/errors (#11590)
This commit is contained in:
parent
71ade71c2b
commit
6986e76adc
@ -25,7 +25,6 @@ import { I18nContext } from '../../../contexts/i18n';
|
|||||||
|
|
||||||
export default function EditGasDisplay({
|
export default function EditGasDisplay({
|
||||||
mode = EDIT_GAS_MODES.MODIFY_IN_PLACE,
|
mode = EDIT_GAS_MODES.MODIFY_IN_PLACE,
|
||||||
alwaysShowForm = false,
|
|
||||||
showEducationButton = false,
|
showEducationButton = false,
|
||||||
onEducationClick,
|
onEducationClick,
|
||||||
transaction,
|
transaction,
|
||||||
@ -59,6 +58,8 @@ export default function EditGasDisplay({
|
|||||||
}) {
|
}) {
|
||||||
const t = useContext(I18nContext);
|
const t = useContext(I18nContext);
|
||||||
|
|
||||||
|
const alwaysShowForm = !estimateToUse || hasGasErrors || false;
|
||||||
|
|
||||||
const requireDappAcknowledgement = Boolean(
|
const requireDappAcknowledgement = Boolean(
|
||||||
transaction?.dappSuggestedGasFees && !dappSuggestedGasFeeAcknowledged,
|
transaction?.dappSuggestedGasFees && !dappSuggestedGasFeeAcknowledged,
|
||||||
);
|
);
|
||||||
@ -216,7 +217,6 @@ export default function EditGasDisplay({
|
|||||||
}
|
}
|
||||||
|
|
||||||
EditGasDisplay.propTypes = {
|
EditGasDisplay.propTypes = {
|
||||||
alwaysShowForm: PropTypes.bool,
|
|
||||||
mode: PropTypes.oneOf(Object.values(EDIT_GAS_MODES)),
|
mode: PropTypes.oneOf(Object.values(EDIT_GAS_MODES)),
|
||||||
showEducationButton: PropTypes.bool,
|
showEducationButton: PropTypes.bool,
|
||||||
onEducationClick: PropTypes.func,
|
onEducationClick: PropTypes.func,
|
||||||
|
Loading…
Reference in New Issue
Block a user