Browse Source

feature(pending channels): add the pending channels to the new channel lists

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
f0c7e8fd42
  1. 43
      app/routes/channels/components/Channels.js

43
app/routes/channels/components/Channels.js

@ -4,6 +4,8 @@ import PropTypes from 'prop-types'
import { FaAlignJustify, FaGlobe } from 'react-icons/lib/fa' import { FaAlignJustify, FaGlobe } from 'react-icons/lib/fa'
import { MdSearch } from 'react-icons/lib/md' import { MdSearch } from 'react-icons/lib/md'
import OpenPendingChannel from 'components/Channels/OpenPendingChannel'
import ClosedPendingChannel from 'components/Channels/ClosedPendingChannel'
import Channel from 'components/Channels/Channel' import Channel from 'components/Channels/Channel'
import NetworkChannels from 'components/Channels/NetworkChannels' import NetworkChannels from 'components/Channels/NetworkChannels'
import ChannelForm from 'components/ChannelForm' import ChannelForm from 'components/ChannelForm'
@ -77,15 +79,38 @@ class Channels extends Component {
viewType === 0 && viewType === 0 &&
<ul className={viewType === 1 && styles.cardsContainer}> <ul className={viewType === 1 && styles.cardsContainer}>
{ {
allChannels.map((channel, index) => ( allChannels.map((channel, index) => {
<Channel if (Object.prototype.hasOwnProperty.call(channel, 'blocks_till_open')) {
key={index} return (
ticker={ticker} <OpenPendingChannel
channel={channel} key={index}
setChannel={() => {}} channel={channel}
currentTicker={currentTicker} ticker={ticker}
/> currentTicker={currentTicker}
)) explorerLinkBase={explorerLinkBase}
/>
)
} else if (Object.prototype.hasOwnProperty.call(channel, 'closing_txid')) {
return (
<ClosedPendingChannel
key={index}
channel={channel}
ticker={ticker}
currentTicker={currentTicker}
explorerLinkBase={explorerLinkBase}
/>
)
}
return (
<Channel
key={index}
ticker={ticker}
channel={channel}
setChannel={() => {}}
currentTicker={currentTicker}
/>
)
})
} }
</ul> </ul>
} }

Loading…
Cancel
Save