|
@ -1,7 +1,6 @@ |
|
|
import React from 'react' |
|
|
import React from 'react' |
|
|
import PropTypes from 'prop-types' |
|
|
import PropTypes from 'prop-types' |
|
|
import Isvg from 'react-inlinesvg' |
|
|
import Isvg from 'react-inlinesvg' |
|
|
import { FaCircle, FaQuestionCircle } from 'react-icons/lib/fa' |
|
|
|
|
|
|
|
|
|
|
|
import x from 'icons/x.svg' |
|
|
import x from 'icons/x.svg' |
|
|
|
|
|
|
|
@ -9,25 +8,19 @@ import styles from './AddChannel.scss' |
|
|
|
|
|
|
|
|
const AddChannel = ({ |
|
|
const AddChannel = ({ |
|
|
contactsform, |
|
|
contactsform, |
|
|
contactsform: { showErrors }, |
|
|
|
|
|
closeContactsForm, |
|
|
closeContactsForm, |
|
|
openSubmitChannelForm, |
|
|
openSubmitChannelForm, |
|
|
updateContactFormSearchQuery, |
|
|
updateContactFormSearchQuery, |
|
|
updateManualFormSearchQuery, |
|
|
updateManualFormSearchQuery, |
|
|
updateContactCapacity, |
|
|
|
|
|
setNode, |
|
|
setNode, |
|
|
openChannel, |
|
|
|
|
|
updateManualFormErrors, |
|
|
|
|
|
activeChannelPubkeys, |
|
|
activeChannelPubkeys, |
|
|
nonActiveChannelPubkeys, |
|
|
nonActiveChannelPubkeys, |
|
|
pendingOpenChannelPubkeys, |
|
|
pendingOpenChannelPubkeys, |
|
|
filteredNetworkNodes, |
|
|
filteredNetworkNodes, |
|
|
loadingChannelPubkeys, |
|
|
loadingChannelPubkeys, |
|
|
showManualForm, |
|
|
showManualForm, |
|
|
manualFormIsValid, |
|
|
|
|
|
openManualForm |
|
|
openManualForm |
|
|
}) => { |
|
|
}) => { |
|
|
|
|
|
|
|
|
const renderRightSide = (node) => { |
|
|
const renderRightSide = (node) => { |
|
|
if (loadingChannelPubkeys.includes(node.pub_key)) { |
|
|
if (loadingChannelPubkeys.includes(node.pub_key)) { |
|
|
return ( |
|
|
return ( |
|
@ -140,7 +133,7 @@ const AddChannel = ({ |
|
|
{ |
|
|
{ |
|
|
showManualForm && |
|
|
showManualForm && |
|
|
<section className={styles.manualForm}> |
|
|
<section className={styles.manualForm}> |
|
|
<p>Hm, looks like we can't see that node from here, wanna try to manually connect?</p> |
|
|
<p>Hm, looks like we can't see that node from here, wanna try to manually connect?</p> |
|
|
<div className={styles.manualConnectButton} onClick={openManualForm}>Connect Manually</div> |
|
|
<div className={styles.manualConnectButton} onClick={openManualForm}>Connect Manually</div> |
|
|
</section> |
|
|
</section> |
|
|
} |
|
|
} |
|
@ -149,7 +142,19 @@ const AddChannel = ({ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
AddChannel.propTypes = { |
|
|
AddChannel.propTypes = { |
|
|
|
|
|
contactsform: PropTypes.object.isRequired, |
|
|
|
|
|
closeContactsForm: PropTypes.func.isRequired, |
|
|
|
|
|
openSubmitChannelForm: PropTypes.func.isRequired, |
|
|
|
|
|
updateContactFormSearchQuery: PropTypes.func.isRequired, |
|
|
|
|
|
updateManualFormSearchQuery: PropTypes.func.isRequired, |
|
|
|
|
|
setNode: PropTypes.func.isRequired, |
|
|
|
|
|
activeChannelPubkeys: PropTypes.array.isRequired, |
|
|
|
|
|
nonActiveChannelPubkeys: PropTypes.array.isRequired, |
|
|
|
|
|
pendingOpenChannelPubkeys: PropTypes.array.isRequired, |
|
|
|
|
|
filteredNetworkNodes: PropTypes.array.isRequired, |
|
|
|
|
|
loadingChannelPubkeys: PropTypes.array.isRequired, |
|
|
|
|
|
showManualForm: PropTypes.bool.isRequired, |
|
|
|
|
|
openManualForm: PropTypes.func.isRequired |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export default AddChannel |
|
|
export default AddChannel |
|
|