1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-30 08:09:15 +01:00
metamask-extension/ui/pages/settings/contact-list-tab/add-contact/add-contact.container.js
Ben Behrman 086003555c
Make ENS named elements domain generic (#16166)
Co-authored-by: Olaf Tomalka <olaf.tomalka@gmail.com>
Co-authored-by: Vincent Shadbolt <vince.shadbolt@gmail.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: Brad Decker <git@braddecker.dev>
2022-11-21 09:19:11 -06:00

39 lines
1.0 KiB
JavaScript

import { compose } from 'redux';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import {
addToAddressBook,
showQrScanner,
qrCodeDetected,
} from '../../../../store/actions';
import { getQrCodeData } from '../../../../ducks/app/app';
import {
getDomainError,
getDomainResolution,
resetDomainResolution,
} from '../../../../ducks/domains';
import AddContact from './add-contact.component';
const mapStateToProps = (state) => {
return {
qrCodeData: getQrCodeData(state),
domainError: getDomainError(state),
domainResolution: getDomainResolution(state),
};
};
const mapDispatchToProps = (dispatch) => {
return {
addToAddressBook: (recipient, nickname) =>
dispatch(addToAddressBook(recipient, nickname)),
scanQrCode: () => dispatch(showQrScanner()),
qrCodeDetected: (data) => dispatch(qrCodeDetected(data)),
resetDomainResolution: () => dispatch(resetDomainResolution()),
};
};
export default compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps),
)(AddContact);