|
|
@ -24,8 +24,10 @@ import { |
|
|
|
openContactsForm, |
|
|
|
closeContactsForm, |
|
|
|
updateContactFormSearchQuery, |
|
|
|
updateManualFormSearchQuery, |
|
|
|
updateContactCapacity, |
|
|
|
contactFormSelectors |
|
|
|
contactFormSelectors, |
|
|
|
updateManualFormErrors |
|
|
|
} from 'reducers/contactsform' |
|
|
|
|
|
|
|
import Contacts from '../components/Contacts' |
|
|
@ -36,13 +38,14 @@ const mapDispatchToProps = { |
|
|
|
openContactModal, |
|
|
|
closeContactModal, |
|
|
|
updateContactFormSearchQuery, |
|
|
|
updateManualFormSearchQuery, |
|
|
|
updateContactCapacity, |
|
|
|
openChannel, |
|
|
|
closeChannel, |
|
|
|
updateChannelSearchQuery, |
|
|
|
toggleFilterPulldown, |
|
|
|
changeFilter, |
|
|
|
|
|
|
|
updateManualFormErrors, |
|
|
|
fetchChannels, |
|
|
|
fetchPeers, |
|
|
|
fetchDescribeNetwork |
|
|
@ -66,7 +69,8 @@ const mapStateToProps = state => ({ |
|
|
|
channelNodes: channelsSelectors.channelNodes(state), |
|
|
|
|
|
|
|
filteredNetworkNodes: contactFormSelectors.filteredNetworkNodes(state), |
|
|
|
showManualForm: contactFormSelectors.showManualForm(state) |
|
|
|
showManualForm: contactFormSelectors.showManualForm(state), |
|
|
|
manualFormIsValid: contactFormSelectors.manualFormIsValid(state) |
|
|
|
}) |
|
|
|
|
|
|
|
const mergeProps = (stateProps, dispatchProps, ownProps) => { |
|
|
@ -77,23 +81,25 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { |
|
|
|
isOpen: stateProps.channels.contactModal.isOpen, |
|
|
|
channel: stateProps.channels.contactModal.channel, |
|
|
|
channelNodes: stateProps.channelNodes, |
|
|
|
closingChannelIds: stateProps.channels.closingChannelIds |
|
|
|
closingChannelIds: stateProps.channels.closingChannelIds, |
|
|
|
manualFormIsValid: stateProps.manualFormIsValid |
|
|
|
} |
|
|
|
|
|
|
|
const contactsFormProps = { |
|
|
|
closeContactsForm: dispatchProps.closeContactsForm, |
|
|
|
updateContactFormSearchQuery: dispatchProps.updateContactFormSearchQuery, |
|
|
|
updateManualFormSearchQuery: dispatchProps.updateManualFormSearchQuery, |
|
|
|
updateContactCapacity: dispatchProps.updateContactCapacity, |
|
|
|
openChannel: dispatchProps.openChannel, |
|
|
|
|
|
|
|
contactsform: stateProps.contactsform, |
|
|
|
filteredNetworkNodes: stateProps.filteredNetworkNodes, |
|
|
|
loadingChannelPubkeys: stateProps.channels.loadingChannelPubkeys, |
|
|
|
showManualForm: stateProps.showManualForm, |
|
|
|
|
|
|
|
manualFormIsValid: stateProps.manualFormIsValid, |
|
|
|
activeChannelPubkeys: stateProps.activeChannelPubkeys, |
|
|
|
nonActiveChannelPubkeys: stateProps.nonActiveChannelPubkeys, |
|
|
|
pendingOpenChannelPubkeys: stateProps.pendingOpenChannelPubkeys |
|
|
|
pendingOpenChannelPubkeys: stateProps.pendingOpenChannelPubkeys, |
|
|
|
updateManualFormErrors: dispatchProps.updateManualFormErrors |
|
|
|
} |
|
|
|
|
|
|
|
return { |
|
|
@ -106,4 +112,4 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default withRouter(connect(mapStateToProps, mapDispatchToProps, mergeProps)(Contacts)) |
|
|
|
export default withRouter(connect(mapStateToProps, mapDispatchToProps, mergeProps)(Contacts)) |