|
|
@ -17,8 +17,6 @@ import { |
|
|
|
} from '../../../../shared/constants/gas'; |
|
|
|
} from '../../../../shared/constants/gas'; |
|
|
|
import { getGasFormErrorText } from '../../../helpers/constants/gas'; |
|
|
|
import { getGasFormErrorText } from '../../../helpers/constants/gas'; |
|
|
|
|
|
|
|
|
|
|
|
const DEFAULT_ESTIMATES_LEVEL = 'medium'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default function AdvancedGasControls({ |
|
|
|
export default function AdvancedGasControls({ |
|
|
|
estimateToUse, |
|
|
|
estimateToUse, |
|
|
|
gasFeeEstimates, |
|
|
|
gasFeeEstimates, |
|
|
@ -97,30 +95,6 @@ export default function AdvancedGasControls({ |
|
|
|
value={maxPriorityFee} |
|
|
|
value={maxPriorityFee} |
|
|
|
detailText={maxPriorityFeeFiat} |
|
|
|
detailText={maxPriorityFeeFiat} |
|
|
|
numeric |
|
|
|
numeric |
|
|
|
titleDetail={ |
|
|
|
|
|
|
|
suggestedValues.maxPriorityFeePerGas && ( |
|
|
|
|
|
|
|
<> |
|
|
|
|
|
|
|
<Typography |
|
|
|
|
|
|
|
tag="span" |
|
|
|
|
|
|
|
color={COLORS.UI4} |
|
|
|
|
|
|
|
variant={TYPOGRAPHY.H8} |
|
|
|
|
|
|
|
fontWeight={FONT_WEIGHT.BOLD} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{t('gasFeeEstimate')}: |
|
|
|
|
|
|
|
</Typography>{' '} |
|
|
|
|
|
|
|
<Typography |
|
|
|
|
|
|
|
tag="span" |
|
|
|
|
|
|
|
color={COLORS.UI4} |
|
|
|
|
|
|
|
variant={TYPOGRAPHY.H8} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gasFeeEstimates?.[DEFAULT_ESTIMATES_LEVEL] |
|
|
|
|
|
|
|
?.suggestedMaxPriorityFeePerGas |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</Typography> |
|
|
|
|
|
|
|
</> |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
error={ |
|
|
|
error={ |
|
|
|
gasErrors?.maxPriorityFee |
|
|
|
gasErrors?.maxPriorityFee |
|
|
|
? getGasFormErrorText(gasErrors.maxPriorityFee, t) |
|
|
|
? getGasFormErrorText(gasErrors.maxPriorityFee, t) |
|
|
@ -138,30 +112,6 @@ export default function AdvancedGasControls({ |
|
|
|
value={maxFee} |
|
|
|
value={maxFee} |
|
|
|
numeric |
|
|
|
numeric |
|
|
|
detailText={maxFeeFiat} |
|
|
|
detailText={maxFeeFiat} |
|
|
|
titleDetail={ |
|
|
|
|
|
|
|
suggestedValues.maxFeePerGas && ( |
|
|
|
|
|
|
|
<> |
|
|
|
|
|
|
|
<Typography |
|
|
|
|
|
|
|
tag="span" |
|
|
|
|
|
|
|
color={COLORS.UI4} |
|
|
|
|
|
|
|
variant={TYPOGRAPHY.H8} |
|
|
|
|
|
|
|
fontWeight={FONT_WEIGHT.BOLD} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{t('gasFeeEstimate')}: |
|
|
|
|
|
|
|
</Typography>{' '} |
|
|
|
|
|
|
|
<Typography |
|
|
|
|
|
|
|
tag="span" |
|
|
|
|
|
|
|
color={COLORS.UI4} |
|
|
|
|
|
|
|
variant={TYPOGRAPHY.H8} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gasFeeEstimates?.[DEFAULT_ESTIMATES_LEVEL] |
|
|
|
|
|
|
|
?.suggestedMaxFeePerGas |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</Typography> |
|
|
|
|
|
|
|
</> |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
error={ |
|
|
|
error={ |
|
|
|
gasErrors?.maxFee |
|
|
|
gasErrors?.maxFee |
|
|
|
? getGasFormErrorText(gasErrors.maxFee, t) |
|
|
|
? getGasFormErrorText(gasErrors.maxFee, t) |
|
|
|