|
|
@ -423,15 +423,26 @@ const allChannels = createSelector( |
|
|
|
pendingForceClosedChannelsSelector, |
|
|
|
channelSearchQuerySelector, |
|
|
|
(activeChannels, nonActiveChannels, pendingOpenChannels, pendingClosedChannels, pendingForcedClosedChannels, searchQuery) => { |
|
|
|
const filteredActiveChannels = activeChannels.filter(channel => channel.remote_pubkey.includes(searchQuery) || channel.channel_point.includes(searchQuery)) |
|
|
|
const filteredNonActiveChannels = nonActiveChannels.filter(channel => channel.remote_pubkey.includes(searchQuery) || channel.channel_point.includes(searchQuery)) |
|
|
|
const filterChannel = channel => |
|
|
|
channel.remote_pubkey.includes(searchQuery) || channel.channel_point.includes(searchQuery) |
|
|
|
|
|
|
|
const filteredPendingOpenChannels = pendingOpenChannels.filter(channel => channel.channel.remote_node_pub.includes(searchQuery) || channel.channel.channel_point.includes(searchQuery)) |
|
|
|
const filteredPendingClosedChannels = pendingClosedChannels.filter(channel => channel.channel.remote_node_pub.includes(searchQuery) || channel.channel.channel_point.includes(searchQuery)) |
|
|
|
const filteredPendingForcedClosedChannels = pendingForcedClosedChannels.filter(channel => channel.channel.remote_node_pub.includes(searchQuery) || channel.channel.channel_point.includes(searchQuery)) |
|
|
|
const filteredActiveChannels = activeChannels.filter(filterChannel) |
|
|
|
const filteredNonActiveChannels = nonActiveChannels.filter(filterChannel) |
|
|
|
|
|
|
|
const filterPendingChannel = channel => |
|
|
|
channel.channel.remote_node_pub.includes(searchQuery) || channel.channel.channel_point.includes(searchQuery) |
|
|
|
|
|
|
|
return [...filteredActiveChannels, ...filteredPendingOpenChannels, ...filteredPendingClosedChannels, ...filteredPendingForcedClosedChannels, ...filteredNonActiveChannels] |
|
|
|
const filteredPendingOpenChannels = pendingOpenChannels.filter(filterPendingChannel) |
|
|
|
const filteredPendingClosedChannels = pendingClosedChannels.filter(filterPendingChannel) |
|
|
|
const filteredPendingForcedClosedChannels = pendingForcedClosedChannels.filter(filterPendingChannel) |
|
|
|
|
|
|
|
return [ |
|
|
|
...filteredActiveChannels, |
|
|
|
...filteredPendingOpenChannels, |
|
|
|
...filteredPendingClosedChannels, |
|
|
|
...filteredPendingForcedClosedChannels, |
|
|
|
...filteredNonActiveChannels |
|
|
|
] |
|
|
|
} |
|
|
|
) |
|
|
|
|
|
|
|