import React from 'react' import PropTypes from 'prop-types' import find from 'lodash/find' import ReactModal from 'react-modal' import { FaClose, FaCircle } from 'react-icons/lib/fa' import { btc } from 'utils' import styles from './ContactModal.scss' const ContactModal = ({ isOpen, channel, closeContactModal, channelNodes, closeChannel, closingChannelIds }) => { if (!channel) { return } const customStyles = { overlay: { cursor: 'pointer', overflowY: 'auto' }, content: { top: 'auto', left: '20%', right: '0', bottom: 'auto', width: '40%', margin: '50px auto', borderRadius: 'none', padding: '0' } } // the remote node for the channel const node = find(channelNodes, { pub_key: channel.remote_pubkey }) return ( document.body} style={customStyles} > { channel &&
{ channel.active ? 'Online' : 'Offline' }
{ node &&

{node.alias}

}

{channel.remote_pubkey}

Can Pay

{btc.satoshisToBtc(channel.local_balance)} BTC

Can Receive

{btc.satoshisToBtc(channel.remote_balance)} BTC

Total Bitcoin Sent

{btc.satoshisToBtc(channel.total_satoshis_sent)} BTC

Total Bitcoin Received

{btc.satoshisToBtc(channel.total_satoshis_received)} BTC

}
) } ContactModal.propTypes = { } export default ContactModal