mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-27 12:56:01 +01:00
23 lines
587 B
JavaScript
23 lines
587 B
JavaScript
import { connect } from 'react-redux';
|
|
import * as actions from '../../../../store/actions';
|
|
import AddToAddressBookModal from './add-to-addressbook-modal.component';
|
|
|
|
function mapStateToProps(state) {
|
|
return {
|
|
...(state.appState.modal.modalState.props || {}),
|
|
};
|
|
}
|
|
|
|
function mapDispatchToProps(dispatch) {
|
|
return {
|
|
hideModal: () => dispatch(actions.hideModal()),
|
|
addToAddressBook: (recipient, nickname) =>
|
|
dispatch(actions.addToAddressBook(recipient, nickname)),
|
|
};
|
|
}
|
|
|
|
export default connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps,
|
|
)(AddToAddressBookModal);
|