import React from 'react' import PropTypes from 'prop-types' import { btc } from 'utils' import styles from './Channel.scss' const Channel = ({ ticker, channel, setChannel, currentTicker }) => (
  • setChannel(channel)}>

    Status: Open

    Remote Pubkey

    {channel.remote_pubkey}

    Channel Point

    {channel.channel_point}

    Capacity

    { ticker.currency === 'btc' ? btc.satoshisToBtc(channel.capacity) : btc.satoshisToUsd(channel.capacity, currentTicker.price_usd) }

    { ticker.currency === 'btc' ? btc.satoshisToBtc(channel.local_balance) : btc.satoshisToUsd(channel.local_balance, currentTicker.price_usd) }

    Local

    { ticker.currency === 'btc' ? btc.satoshisToBtc(channel.remote_balance) : btc.satoshisToUsd(channel.remote_balance, currentTicker.price_usd) }

    Remote
  • ) Channel.propTypes = { ticker: PropTypes.object.isRequired, channel: PropTypes.object.isRequired, setChannel: PropTypes.func.isRequired, currentTicker: PropTypes.object.isRequired } export default Channel