mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Working on some lint issues in 2 files. (#18633)
* Addressed some lint issues. * Worked on the mentioned lint issue. * Worked on the CRLF lint issues. --------- Co-authored-by: Brad Decker <bhdecker84@gmail.com> Co-authored-by: George Marshall <george.marshall@consensys.net>
This commit is contained in:
parent
1c199d3223
commit
dd04913e7e
@ -4,20 +4,19 @@ import { useSelector, useDispatch } from 'react-redux';
|
|||||||
import { useTransactionEventFragment } from '../../../../hooks/useTransactionEventFragment';
|
import { useTransactionEventFragment } from '../../../../hooks/useTransactionEventFragment';
|
||||||
import { EditGasModes } from '../../../../../shared/constants/gas';
|
import { EditGasModes } from '../../../../../shared/constants/gas';
|
||||||
import Box from '../../../ui/box';
|
import Box from '../../../ui/box';
|
||||||
import Typography from '../../../ui/typography';
|
|
||||||
import CheckBox from '../../../ui/check-box';
|
import CheckBox from '../../../ui/check-box';
|
||||||
import {
|
import {
|
||||||
DISPLAY,
|
DISPLAY,
|
||||||
FLEX_DIRECTION,
|
FLEX_DIRECTION,
|
||||||
TextColor,
|
TextColor,
|
||||||
TypographyVariant,
|
TextVariant,
|
||||||
} from '../../../../helpers/constants/design-system';
|
} from '../../../../helpers/constants/design-system';
|
||||||
import { getAdvancedGasFeeValues } from '../../../../selectors';
|
import { getAdvancedGasFeeValues } from '../../../../selectors';
|
||||||
import { setAdvancedGasFee } from '../../../../store/actions';
|
import { setAdvancedGasFee } from '../../../../store/actions';
|
||||||
import { useGasFeeContext } from '../../../../contexts/gasFee';
|
import { useGasFeeContext } from '../../../../contexts/gasFee';
|
||||||
|
|
||||||
import { useAdvancedGasFeePopoverContext } from '../context';
|
import { useAdvancedGasFeePopoverContext } from '../context';
|
||||||
import { useI18nContext } from '../../../../hooks/useI18nContext';
|
import { useI18nContext } from '../../../../hooks/useI18nContext';
|
||||||
|
import { Text } from '../../../component-library';
|
||||||
|
|
||||||
const AdvancedGasFeeDefaults = () => {
|
const AdvancedGasFeeDefaults = () => {
|
||||||
const t = useI18nContext();
|
const t = useI18nContext();
|
||||||
@ -87,8 +86,9 @@ const AdvancedGasFeeDefaults = () => {
|
|||||||
onClick={handleUpdateDefaultSettings}
|
onClick={handleUpdateDefaultSettings}
|
||||||
disabled={gasErrors.maxFeePerGas || gasErrors.maxPriorityFeePerGas}
|
disabled={gasErrors.maxFeePerGas || gasErrors.maxPriorityFeePerGas}
|
||||||
/>
|
/>
|
||||||
<Typography
|
<Text
|
||||||
variant={TypographyVariant.H7}
|
variant={TextVariant.bodySm}
|
||||||
|
as="h6"
|
||||||
color={TextColor.textAlternative}
|
color={TextColor.textAlternative}
|
||||||
margin={0}
|
margin={0}
|
||||||
>
|
>
|
||||||
@ -97,7 +97,7 @@ const AdvancedGasFeeDefaults = () => {
|
|||||||
: t('advancedGasFeeDefaultOptIn', [
|
: t('advancedGasFeeDefaultOptIn', [
|
||||||
<strong key="default-value-change">{t('newValues')}</strong>,
|
<strong key="default-value-change">{t('newValues')}</strong>,
|
||||||
])}
|
])}
|
||||||
</Typography>
|
</Text>
|
||||||
</label>
|
</label>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@ -2,14 +2,14 @@ import React, { useEffect, useState } from 'react';
|
|||||||
|
|
||||||
import { useGasFeeContext } from '../../../../contexts/gasFee';
|
import { useGasFeeContext } from '../../../../contexts/gasFee';
|
||||||
import { bnGreaterThan, bnLessThan } from '../../../../helpers/utils/util';
|
import { bnGreaterThan, bnLessThan } from '../../../../helpers/utils/util';
|
||||||
import { TypographyVariant } from '../../../../helpers/constants/design-system';
|
import { TextVariant } from '../../../../helpers/constants/design-system';
|
||||||
import { useI18nContext } from '../../../../hooks/useI18nContext';
|
import { useI18nContext } from '../../../../hooks/useI18nContext';
|
||||||
import { MAX_GAS_LIMIT_DEC } from '../../../../pages/send/send.constants';
|
import { MAX_GAS_LIMIT_DEC } from '../../../../pages/send/send.constants';
|
||||||
import Button from '../../../ui/button';
|
import Button from '../../../ui/button';
|
||||||
import FormField from '../../../ui/form-field';
|
import FormField from '../../../ui/form-field';
|
||||||
import Typography from '../../../ui/typography';
|
|
||||||
|
|
||||||
import { useAdvancedGasFeePopoverContext } from '../context';
|
import { useAdvancedGasFeePopoverContext } from '../context';
|
||||||
|
import { Text } from '../../../component-library';
|
||||||
|
|
||||||
const validateGasLimit = (gasLimit, minimumGasLimitDec) => {
|
const validateGasLimit = (gasLimit, minimumGasLimitDec) => {
|
||||||
return bnLessThan(gasLimit, minimumGasLimitDec) ||
|
return bnLessThan(gasLimit, minimumGasLimitDec) ||
|
||||||
@ -58,9 +58,10 @@ const AdvancedGasFeeGasLimit = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Typography
|
<Text
|
||||||
tag={TypographyVariant.paragraph}
|
tag={TextVariant.bodyMd}
|
||||||
variant={TypographyVariant.H7}
|
variant={TextVariant.bodySm}
|
||||||
|
as="h6"
|
||||||
className="advanced-gas-fee-gas-limit"
|
className="advanced-gas-fee-gas-limit"
|
||||||
marginTop={4}
|
marginTop={4}
|
||||||
marginLeft={2}
|
marginLeft={2}
|
||||||
@ -76,7 +77,7 @@ const AdvancedGasFeeGasLimit = () => {
|
|||||||
>
|
>
|
||||||
{t('edit')}
|
{t('edit')}
|
||||||
</Button>
|
</Button>
|
||||||
</Typography>
|
</Text>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user