From 970dfdd98e74abd5d6895e44360ea679c74be0b1 Mon Sep 17 00:00:00 2001 From: Jack Mallers Date: Thu, 4 Jan 2018 14:47:45 -0600 Subject: [PATCH] fix(contacts): fix some pending/closing contacts bugs --- app/components/Contacts/ClosingContact.js | 1 + app/components/Contacts/ContactsForm.js | 2 ++ app/components/Contacts/PendingContact.js | 1 + app/reducers/channels.js | 2 +- app/routes/contacts/components/Contacts.js | 11 +++++------ 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/components/Contacts/ClosingContact.js b/app/components/Contacts/ClosingContact.js index 99046b10..6d887f4d 100644 --- a/app/components/Contacts/ClosingContact.js +++ b/app/components/Contacts/ClosingContact.js @@ -1,3 +1,4 @@ +import { shell } from 'electron' import React from 'react' import PropTypes from 'prop-types' import { FaCircle } from 'react-icons/lib/fa' diff --git a/app/components/Contacts/ContactsForm.js b/app/components/Contacts/ContactsForm.js index e6bbda16..4e8cc34a 100644 --- a/app/components/Contacts/ContactsForm.js +++ b/app/components/Contacts/ContactsForm.js @@ -89,6 +89,8 @@ class ContactsForm extends React.Component { const [pubkey, host] = manualFormInput && manualFormInput.split('@') openChannel({ pubkey, host, local_amt: contactsform.contactCapacity }) + + this.setState({ manualFormInput: '' }) } return ( diff --git a/app/components/Contacts/PendingContact.js b/app/components/Contacts/PendingContact.js index 1375bcb6..c5f0a01b 100644 --- a/app/components/Contacts/PendingContact.js +++ b/app/components/Contacts/PendingContact.js @@ -1,3 +1,4 @@ +import { shell } from 'electron' import React from 'react' import PropTypes from 'prop-types' import { FaCircle } from 'react-icons/lib/fa' diff --git a/app/reducers/channels.js b/app/reducers/channels.js index e67658b5..0a752df8 100644 --- a/app/reducers/channels.js +++ b/app/reducers/channels.js @@ -350,7 +350,7 @@ const allChannels = createSelector( const filteredPendingForcedClosedChannels = pendingForcedClosedChannels.filter(channel => channel.channel.remote_node_pub.includes(searchQuery) || channel.channel.channel_point.includes(searchQuery)) // eslint-disable-line - return [...filteredActiveChannels, ...filteredNonActiveChannels, ...filteredPendingOpenChannels, ...filteredPendingClosedChannels, ...filteredPendingForcedClosedChannels] + return [...filteredActiveChannels, ...filteredPendingOpenChannels, ...filteredPendingClosedChannels, ...filteredPendingForcedClosedChannels, ...filteredNonActiveChannels] } ) diff --git a/app/routes/contacts/components/Contacts.js b/app/routes/contacts/components/Contacts.js index 159765e7..43da439b 100644 --- a/app/routes/contacts/components/Contacts.js +++ b/app/routes/contacts/components/Contacts.js @@ -1,4 +1,3 @@ -import { shell } from 'electron' import React, { Component } from 'react' import PropTypes from 'prop-types' @@ -151,14 +150,14 @@ class Contacts extends Component {