import React, { Component } from 'react'
import PropTypes from 'prop-types'
import ReactSVG from 'react-svg'
import Channels from 'components/Channels'
import Peers from './components/Peers'
import styles from './Wallet.scss'
class Wallet extends Component {
componentWillMount() {
const { fetchPeers, fetchChannels, newAddress } = this.props
fetchPeers()
fetchChannels()
newAddress('p2pkh')
}
render() {
const {
info,
address: { address },
ticker,
peers: { peersLoading, peers, peer, peerForm },
channels: { channelsLoading, channels, channel, channelForm, pendingChannels },
setPeer,
setChannel,
peerModalOpen,
channelModalOpen,
setPeerForm,
setChannelForm,
connectRequest,
disconnectRequest,
allChannels,
openChannel,
closeChannel,
currentTicker,
explorerLinkBase
} = this.props
return (
)
}
}
Wallet.propTypes = {
fetchPeers: PropTypes.func.isRequired,
fetchChannels: PropTypes.func.isRequired,
info: PropTypes.object.isRequired,
ticker: PropTypes.object.isRequired,
peers: PropTypes.object.isRequired,
channels: PropTypes.object.isRequired,
setPeer: PropTypes.func.isRequired,
setChannel: PropTypes.func.isRequired,
peerModalOpen: PropTypes.bool.isRequired,
channelModalOpen: PropTypes.bool.isRequired,
setPeerForm: PropTypes.func.isRequired,
setChannelForm: PropTypes.func.isRequired,
connectRequest: PropTypes.func.isRequired,
disconnectRequest: PropTypes.func.isRequired,
allChannels: PropTypes.array.isRequired,
openChannel: PropTypes.func.isRequired,
closeChannel: PropTypes.func.isRequired,
newAddress: PropTypes.func.isRequired,
address: PropTypes.object.isRequired,
currentTicker: PropTypes.object.isRequired,
explorerLinkBase: PropTypes.string.isRequired
}
export default Wallet