import React from 'react'; import { PRIORITY_LEVELS } from '../../../../shared/constants/gas'; import { useI18nContext } from '../../../hooks/useI18nContext'; import { useTransactionModalContext } from '../../../contexts/transaction-modal'; import ErrorMessage from '../../ui/error-message'; import I18nValue from '../../ui/i18n-value'; import Popover from '../../ui/popover'; import Typography from '../../ui/typography/typography'; import { COLORS, TYPOGRAPHY } from '../../../helpers/constants/design-system'; import { INSUFFICIENT_FUNDS_ERROR_KEY } from '../../../helpers/constants/error-keys'; import { useGasFeeContext } from '../../../contexts/gasFee'; import EditGasItem from './edit-gas-item'; import NetworkStatistics from './network-statistics'; const EditGasFeePopover = () => { const { balanceError } = useGasFeeContext(); const t = useI18nContext(); const { closeModal, currentModal } = useTransactionModalContext(); if (currentModal !== 'editGasFee') return null; return ( closeModal('editGasFee')} className="edit-gas-fee-popover" > <>
{balanceError && ( )}
, ]} />
); }; export default EditGasFeePopover;