1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-01 21:57:06 +01:00
metamask-extension/ui/components/institutional/compliance-details-modal/compliance-details-modal.js

37 lines
1021 B
JavaScript
Raw Normal View History

import PropTypes from 'prop-types';
import React, { useContext } from 'react';
import { useDispatch } from 'react-redux';
import Modal from '../../app/modal';
import { hideModal } from '../../../store/actions';
import ComplianceDetails from '../compliance-details';
import { I18nContext } from '../../../contexts/i18n';
export default function ComplianceDetailsModal({
onGenerateComplianceReport,
reportAddress,
}) {
const dispatch = useDispatch();
const handleClose = () => dispatch(hideModal);
const t = useContext(I18nContext);
return (
<Modal
headerText={t('amlCompliance')}
hideFooter="true"
onClose={handleClose}
contentClass="compliance-details-modal-content"
>
<ComplianceDetails
address={reportAddress}
onClose={handleClose}
onGenerate={onGenerateComplianceReport}
/>
</Modal>
);
}
ComplianceDetailsModal.propTypes = {
reportAddress: PropTypes.func.isRequired,
onGenerateComplianceReport: PropTypes.func.isRequired,
};