diff --git a/app/components/Contacts/ContactsForm.js b/app/components/Contacts/ContactsForm.js
index ed48cb58..e6bbda16 100644
--- a/app/components/Contacts/ContactsForm.js
+++ b/app/components/Contacts/ContactsForm.js
@@ -10,7 +10,8 @@ class ContactsForm extends React.Component {
super(props)
this.state = {
- editing: false
+ editing: false,
+ manualFormInput: ''
}
}
@@ -25,10 +26,11 @@ class ContactsForm extends React.Component {
activeChannelPubkeys,
nonActiveChannelPubkeys,
pendingOpenChannelPubkeys,
- filteredNetworkNodes
+ filteredNetworkNodes,
+ showManualForm
} = this.props
- const { editing } = this.state
+ const { editing, manualFormInput } = this.state
const renderRightSide = (node) => {
if (activeChannelPubkeys.includes(node.pub_key)) {
@@ -67,7 +69,7 @@ class ContactsForm extends React.Component {
openChannel({ pubkey: node.pub_key, host: node.addresses[0].addr, local_amt: contactsform.contactsform.contactCapacity })}
+ onClick={() => openChannel({ pubkey: node.pub_key, host: node.addresses[0].addr, local_amt: contactsform.contactCapacity })}
>
Connect
@@ -80,6 +82,15 @@ class ContactsForm extends React.Component {
this.setState({ editing: true })
}
+ const manualFormSubmit = () => {
+ if (!manualFormInput.length) { return }
+ if (!manualFormInput.includes('@')) { return }
+
+ const [pubkey, host] = manualFormInput && manualFormInput.split('@')
+
+ openChannel({ pubkey, host, local_amt: contactsform.contactCapacity })
+ }
+
return (
+
+ {
+ showManualForm &&
+
+
Hm, looks like we can't see that contact from here. Want to try and manually connect?
+
+
+ }
+