import React from 'react' import PropTypes from 'prop-types' import FaAngleDown from 'react-icons/lib/fa/angle-down' import styles from './SubmitChannelForm.scss' class SubmitChannelForm extends React.Component { render() { const { closeChannelForm, closeContactsForm, node, contactCapacity, updateContactCapacity, openChannel, toggleCurrencyProps: { setContactsCurrencyFilters, showCurrencyFilters, currencyName, currentCurrencyFilters, onCurrencyFilterClick, contactFormUsdAmount } } = this.props const renderTitle = () => { // if the node has an alias set we will show that with the pubkey in parens // if not, just show the pubkey (would look ugly with rando parens) if (node.alias && node.alias.length) { return `${node.alias} (${node.pub_key})` } return node.pub_key } const formSubmitted = () => { // dont submit to LND if they havent set channel capacity amount if (contactCapacity <= 0) { return } // submit the channel to LND openChannel({ pubkey: node.pub_key, host: node.addresses[0].addr, local_amt: contactCapacity }) // close the ChannelForm component closeChannelForm() // close the AddChannel component closeContactsForm() } return (

Add Funds to Network

Adding a connection will help you send and receive money on the Lightning Network. You aren't spening any money, rather moving the money you plan to use onto the network.

{renderTitle()}

updateContactCapacity(event.target.value)} id="amount" />
setContactsCurrencyFilters(!showCurrencyFilters)} > {currencyName}
    {currentCurrencyFilters.map(filter => (
  • onCurrencyFilterClick(filter.key)}> {filter.name}
  • ))}
{`≈ ${contactFormUsdAmount || 0} USD`}
0 && styles.active}`} onClick={formSubmitted} > Submit
) } } SubmitChannelForm.propTypes = { closeChannelForm: PropTypes.func.isRequired, closeContactsForm: PropTypes.func.isRequired, node: PropTypes.object.isRequired, contactCapacity: PropTypes.PropTypes.oneOfType([PropTypes.number, PropTypes.string]), updateContactCapacity: PropTypes.func.isRequired, openChannel: PropTypes.func.isRequired, toggleCurrencyProps: PropTypes.object.isRequired } export default SubmitChannelForm