From 086de0834228d732f661b7b3b69dd3fb9ef9d798 Mon Sep 17 00:00:00 2001 From: Jack Mallers Date: Wed, 9 May 2018 20:41:15 -0500 Subject: [PATCH 1/2] fix(disconnect): only show disconnect when channel is established --- app/components/Contacts/Network.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/app/components/Contacts/Network.js b/app/components/Contacts/Network.js index 289e4a75..793cb960 100644 --- a/app/components/Contacts/Network.js +++ b/app/components/Contacts/Network.js @@ -257,16 +257,20 @@ class Network extends Component {
-
removeClicked(channel)}> { - closingChannelIds.includes(channel.chan_id) ? - - Closing - - : + closingChannelIds.includes(channel.chan_id) && +
+ + Closing + +
+ } + { + (Object.prototype.hasOwnProperty.call(channel, 'active') && !closingChannelIds.includes(channel.chan_id)) && +
removeClicked(channel)}>
Disconnect
+
} -
From 78afbb05f28fde275c47d4beaccc6fc84c7aa602 Mon Sep 17 00:00:00 2001 From: Jack Mallers Date: Wed, 9 May 2018 20:42:12 -0500 Subject: [PATCH 2/2] fix(lint): fix linting errors --- app/components/Contacts/Network.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/components/Contacts/Network.js b/app/components/Contacts/Network.js index 793cb960..3810f183 100644 --- a/app/components/Contacts/Network.js +++ b/app/components/Contacts/Network.js @@ -257,20 +257,20 @@ class Network extends Component {
- { - closingChannelIds.includes(channel.chan_id) && -
- - Closing - -
- } - { - (Object.prototype.hasOwnProperty.call(channel, 'active') && !closingChannelIds.includes(channel.chan_id)) && -
removeClicked(channel)}> -
Disconnect
+ { + closingChannelIds.includes(channel.chan_id) && +
+ + Closing +
- } + } + { + (Object.prototype.hasOwnProperty.call(channel, 'active') && !closingChannelIds.includes(channel.chan_id)) && +
removeClicked(channel)}> +
Disconnect
+
+ }