diff --git a/src/views/Wallet/views/Account/Send/components/AdvancedForm/index.js b/src/views/Wallet/views/Account/Send/components/AdvancedForm/index.js index 0e9ea9e0..6af73ddd 100644 --- a/src/views/Wallet/views/Account/Send/components/AdvancedForm/index.js +++ b/src/views/Wallet/views/Account/Send/components/AdvancedForm/index.js @@ -138,6 +138,7 @@ const AdvancedForm = (props: Props) => { errors, warnings, infos, + touched, data, gasLimit, gasPrice, @@ -158,6 +159,8 @@ const AdvancedForm = (props: Props) => { gasLimitTooltipValue = network.defaultGasLimit.toString(10); } + const showDefaultGasLimitButton = data.length === 0 && touched.gasLimit; + return ( @@ -190,13 +193,15 @@ const AdvancedForm = (props: Props) => { /> - setDefaultGasLimit()}> - Set default - + { showDefaultGasLimitButton && ( + setDefaultGasLimit()}> + Set default + ) + } )} - bottomText={errors.gasLimit || warnings.gasLimit || infos.gasLimit || (calculatingGasLimit ? 'Calculating...' : '')} - value={gasLimit} + bottomText={errors.gasLimit || warnings.gasLimit || infos.gasLimit} + value={calculatingGasLimit ? 'Calculating...' : gasLimit} isDisabled={networkSymbol === currency && data.length > 0} onChange={event => onGasLimitChange(event.target.value)} />