You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.7 KiB
53 lines
1.7 KiB
3 years ago
|
import React from 'react';
|
||
|
import { useSelector } from 'react-redux';
|
||
|
|
||
|
import { TYPOGRAPHY } from '../../../../helpers/constants/design-system';
|
||
|
import { useI18nContext } from '../../../../hooks/useI18nContext';
|
||
|
import { getIsMainnet } from '../../../../selectors';
|
||
3 years ago
|
import Box from '../../../ui/box';
|
||
|
import I18nValue from '../../../ui/i18n-value';
|
||
|
import InfoTooltip from '../../../ui/info-tooltip/info-tooltip';
|
||
|
import Typography from '../../../ui/typography/typography';
|
||
3 years ago
|
|
||
|
const GasDetailsItemTitle = () => {
|
||
|
const t = useI18nContext();
|
||
|
const isMainnet = useSelector(getIsMainnet);
|
||
|
|
||
|
return (
|
||
|
<Box display="flex">
|
||
|
<Box marginRight={1}>
|
||
3 years ago
|
<I18nValue messageKey="gas" />
|
||
3 years ago
|
</Box>
|
||
|
<span className="gas-details-item-title__estimate">
|
||
|
(<I18nValue messageKey="transactionDetailGasInfoV2" />)
|
||
|
</span>
|
||
|
<InfoTooltip
|
||
|
contentText={
|
||
|
<>
|
||
|
<Typography variant={TYPOGRAPHY.H7}>
|
||
|
{t('transactionDetailGasTooltipIntro', [
|
||
|
isMainnet ? t('networkNameEthereum') : '',
|
||
|
])}
|
||
|
</Typography>
|
||
|
<Typography variant={TYPOGRAPHY.H7}>
|
||
|
{t('transactionDetailGasTooltipExplanation')}
|
||
|
</Typography>
|
||
|
<Typography variant={TYPOGRAPHY.H7}>
|
||
|
<a
|
||
|
href="https://community.metamask.io/t/what-is-gas-why-do-transactions-take-so-long/3172"
|
||
|
target="_blank"
|
||
|
rel="noopener noreferrer"
|
||
|
>
|
||
|
{t('transactionDetailGasTooltipConversion')}
|
||
|
</a>
|
||
|
</Typography>
|
||
|
</>
|
||
|
}
|
||
|
position="bottom"
|
||
|
/>
|
||
|
</Box>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default GasDetailsItemTitle;
|