import React from 'react' import PropTypes from 'prop-types' import Isvg from 'react-inlinesvg' import { FaCircle, FaQuestionCircle } from 'react-icons/lib/fa' import x from 'icons/x.svg' import styles from './AddChannel.scss' const AddChannel = ({ contactsform, contactsform: { showErrors }, closeContactsForm, openSubmitChannelForm, updateContactFormSearchQuery, updateManualFormSearchQuery, updateContactCapacity, setNode, openChannel, updateManualFormErrors, activeChannelPubkeys, nonActiveChannelPubkeys, pendingOpenChannelPubkeys, filteredNetworkNodes, loadingChannelPubkeys, showManualForm, manualFormIsValid, openManualForm }) => { const renderRightSide = (node) => { if (loadingChannelPubkeys.includes(node.pub_key)) { return (
) } if (activeChannelPubkeys.includes(node.pub_key)) { return ( Online ) } if (nonActiveChannelPubkeys.includes(node.pub_key)) { return ( Offline ) } if (pendingOpenChannelPubkeys.includes(node.pub_key)) { return ( Pending ) } if (!node.addresses.length) { return ( Private ) } return ( { // set the node public key for the submit form setNode(node) // open the submit form openSubmitChannelForm() }} > Connect ) } const searchUpdated = (search) => { updateContactFormSearchQuery(search) if (search.includes('@') && search.split('@')[0].length === 66) { updateManualFormSearchQuery(search) } } return (
searchUpdated(event.target.value)} // ref={input => input && input.focus()} />
    { filteredNetworkNodes.map(node => (
  • { node.alias.length > 0 ?

    {node.alias.trim()} ({node.pub_key.substr(0, 10)}...{node.pub_key.substr(node.pub_key.length - 10)})

    :

    {node.pub_key}

    }
    {renderRightSide(node)}
  • )) }
{ showManualForm &&

Hm, looks like we can't see that node from here, wanna try to manually connect?

Connect Manually
}
) } AddChannel.propTypes = { } export default AddChannel