import { shell } from 'electron' import React from 'react' import PropTypes from 'prop-types' import { btc } from 'utils' import styles from './OpenPendingChannel.scss' const OpenPendingChannel = ({ ticker, channel: { channel }, currentTicker, explorerLinkBase }) => (
  • shell.openExternal(`${explorerLinkBase}/tx/${channel.channel_point.split(':')[0]}`)}>

    Opening Channel...

    Remote Pubkey

    {channel.remote_node_pub}

    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
  • ) OpenPendingChannel.propTypes = { ticker: PropTypes.object.isRequired, channel: PropTypes.object.isRequired, currentTicker: PropTypes.object.isRequired, explorerLinkBase: PropTypes.string.isRequired } export default OpenPendingChannel