diff --git a/app/reducers/channels.js b/app/reducers/channels.js index 9c019fd0..cd85d50d 100644 --- a/app/reducers/channels.js +++ b/app/reducers/channels.js @@ -380,6 +380,7 @@ 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 pendingForceClosedChannelsSelector = state => state.channels.pendingChannels.pending_force_closing_channels +const waitingCloseChannelsSelector = state => state.channels.pendingChannels.waiting_close_channels const channelSearchQuerySelector = state => state.channels.searchQuery const filtersSelector = state => state.channels.filters const filterSelector = state => state.channels.filter @@ -453,8 +454,9 @@ const allChannels = createSelector( pendingOpenChannelsSelector, pendingClosedChannelsSelector, pendingForceClosedChannelsSelector, + waitingCloseChannelsSelector, channelSearchQuerySelector, - (activeChannels, nonActiveChannels, pendingOpenChannels, pendingClosedChannels, pendingForcedClosedChannels, searchQuery) => { + (activeChannels, nonActiveChannels, pendingOpenChannels, pendingClosedChannels, pendingForcedClosedChannels, waitingCloseChannels, searchQuery) => { const filterChannel = channel => channel.remote_pubkey.includes(searchQuery) || channel.channel_point.includes(searchQuery) @@ -467,13 +469,15 @@ const allChannels = createSelector( const filteredPendingOpenChannels = pendingOpenChannels.filter(filterPendingChannel) const filteredPendingClosedChannels = pendingClosedChannels.filter(filterPendingChannel) const filteredPendingForcedClosedChannels = pendingForcedClosedChannels.filter(filterPendingChannel) + const filteredWaitingCloseChannels = waitingCloseChannels.filter(filterPendingChannel) return [ ...filteredActiveChannels, ...filteredPendingOpenChannels, ...filteredPendingClosedChannels, ...filteredPendingForcedClosedChannels, - ...filteredNonActiveChannels + ...filteredNonActiveChannels, + ...filteredWaitingCloseChannels ] } ) @@ -508,6 +512,7 @@ export const currentChannels = createSelector( } } + const channelArray = filteredArray(channelFilter.key) return channelArray.filter(channel => (Object.prototype.hasOwnProperty.call(channel, 'channel') ? @@ -529,7 +534,8 @@ const initialState = { total_limbo_balance: '', pending_open_channels: [], pending_closing_channels: [], - pending_force_closing_channels: [] + pending_force_closing_channels: [], + waiting_close_channels: [] }, channel: null, channelForm: { diff --git a/test/reducers/__snapshots__/channels.spec.js.snap b/test/reducers/__snapshots__/channels.spec.js.snap index d1e95f6b..cb398edc 100644 --- a/test/reducers/__snapshots__/channels.spec.js.snap +++ b/test/reducers/__snapshots__/channels.spec.js.snap @@ -51,6 +51,7 @@ Object { "pending_force_closing_channels": Array [], "pending_open_channels": Array [], "total_limbo_balance": "", + "waiting_close_channels": Array [], }, "searchQuery": "", "selectedChannel": null, @@ -114,6 +115,7 @@ Object { "pending_force_closing_channels": Array [], "pending_open_channels": Array [], "total_limbo_balance": "", + "waiting_close_channels": Array [], }, "searchQuery": "", "selectedChannel": null, @@ -241,6 +243,7 @@ Object { "pending_force_closing_channels": Array [], "pending_open_channels": Array [], "total_limbo_balance": "", + "waiting_close_channels": Array [], }, "searchQuery": "", "selectedChannel": null, @@ -304,6 +307,7 @@ Object { "pending_force_closing_channels": Array [], "pending_open_channels": Array [], "total_limbo_balance": "", + "waiting_close_channels": Array [], }, "searchQuery": "", "selectedChannel": null,