Browse Source

Merge pull request #485 from LN-Zap/fix/waiting-close-channels

fix(waiting_close_channels): account for waiting_close_channels
renovate/lint-staged-8.x
Ben Woosley 7 years ago
committed by GitHub
parent
commit
70308619d5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      app/components/Contacts/Network.js
  2. 8
      app/reducers/channels.js

5
app/components/Contacts/Network.js

@ -130,6 +130,11 @@ class Network extends Component {
return 'closing'
}
// if the channel is in waiting_close_channels phase
if (Object.prototype.hasOwnProperty.call(statusChannel, 'waiting_close_channels')) {
return 'closing'
}
// if we are in the process of closing this channel
if (closingChannelIds.includes(statusChannel.chan_id)) {
return 'closing'

8
app/reducers/channels.js

@ -404,6 +404,8 @@ const channelsSelector = state => state.channels.channels
const pendingOpenChannelsSelector = state => state.channels.pendingChannels.pending_open_channels
const pendingClosedChannelsSelector = state =>
state.channels.pendingChannels.pending_closing_channels
const pendingWaitingCloseChannelsSelector = state =>
state.channels.pendingChannels.waiting_close_channels
const pendingForceClosedChannelsSelector = state =>
state.channels.pendingChannels.pending_force_closing_channels
const waitingCloseChannelsSelector = state => state.channels.pendingChannels.waiting_close_channels
@ -457,9 +459,11 @@ channelsSelectors.pendingOpenChannelPubkeys = createSelector(
channelsSelectors.closingPendingChannels = createSelector(
pendingClosedChannelsSelector,
pendingForceClosedChannelsSelector,
(pendingClosedChannels, pendingForcedClosedChannels) => [
pendingWaitingCloseChannelsSelector,
(pendingClosedChannels, pendingForcedClosedChannels, pendingWaitingCloseChannels) => [
...pendingClosedChannels,
...pendingForcedClosedChannels
...pendingForcedClosedChannels,
...pendingWaitingCloseChannels
]
)

Loading…
Cancel
Save