|
|
|
@ -80,6 +80,11 @@ export default function EditGasDisplay({ |
|
|
|
|
const networkSupports1559 = useSelector(isEIP1559Network); |
|
|
|
|
const showTopError = balanceError; |
|
|
|
|
|
|
|
|
|
const showRadioButtons = |
|
|
|
|
networkSupports1559 && |
|
|
|
|
!requireDappAcknowledgement && |
|
|
|
|
![EDIT_GAS_MODES.SPEED_UP, EDIT_GAS_MODES.CANCEL].includes(mode); |
|
|
|
|
|
|
|
|
|
let errorKey; |
|
|
|
|
if (balanceError) { |
|
|
|
|
errorKey = 'insufficientFunds'; |
|
|
|
@ -163,9 +168,7 @@ export default function EditGasDisplay({ |
|
|
|
|
{t('gasDisplayAcknowledgeDappButtonText')} |
|
|
|
|
</Button> |
|
|
|
|
)} |
|
|
|
|
{networkSupports1559 && |
|
|
|
|
!requireDappAcknowledgement && |
|
|
|
|
![EDIT_GAS_MODES.SPEED_UP, EDIT_GAS_MODES.CANCEL].includes(mode) && ( |
|
|
|
|
{showRadioButtons && ( |
|
|
|
|
<RadioGroup |
|
|
|
|
name="gas-recommendation" |
|
|
|
|
options={[ |
|
|
|
@ -183,15 +186,14 @@ export default function EditGasDisplay({ |
|
|
|
|
{ |
|
|
|
|
value: GAS_RECOMMENDATIONS.HIGH, |
|
|
|
|
label: t('editGasHigh'), |
|
|
|
|
recommended: |
|
|
|
|
defaultEstimateToUse === GAS_RECOMMENDATIONS.HIGH, |
|
|
|
|
recommended: defaultEstimateToUse === GAS_RECOMMENDATIONS.HIGH, |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
selectedValue={estimateToUse} |
|
|
|
|
onChange={setEstimateToUse} |
|
|
|
|
/> |
|
|
|
|
)} |
|
|
|
|
{!requireDappAcknowledgement && ( |
|
|
|
|
{!requireDappAcknowledgement && showRadioButtons && ( |
|
|
|
|
<button |
|
|
|
|
className="edit-gas-display__advanced-button" |
|
|
|
|
onClick={() => setShowAdvancedForm(!showAdvancedForm)} |
|
|
|
|