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