Browse Source

fix(lint): fix so many linting errors lol

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
10d6544986
  1. 125
      app/components/Network/CanvasNetworkGraph.js
  2. 4
      app/components/Network/ChannelsList.js
  3. 4
      app/components/Network/PeersList.js
  4. 5
      app/components/Network/TransactionForm.js
  5. 4
      app/components/Wallet/ReceiveModal.js
  6. 6
      app/components/Wallet/Wallet.js
  7. 16
      app/lnd/methods/index.js
  8. 42
      app/lnd/utils/index.js
  9. 11
      app/reducers/network.js
  10. 1
      app/routes/activity/components/Activity.js
  11. 1
      app/routes/activity/components/components/Modal/Invoice/Invoice.js
  12. 3
      app/routes/activity/components/components/Modal/Modal.js
  13. 1
      app/routes/activity/components/components/Modal/Payment/Payment.js
  14. 9
      app/routes/activity/components/components/Modal/Transaction/Transaction.js
  15. 3
      app/routes/app/components/App.js
  16. 3
      app/routes/app/containers/AppContainer.js
  17. 4
      app/routes/channels/components/Channels.js
  18. 30
      app/routes/network/components/Network.js
  19. 4
      app/routes/network/containers/NetworkContainer.js
  20. 4
      app/routes/peers/components/Peers.js
  21. BIN
      resources/bin/darwin/lnd

125
app/components/Network/CanvasNetworkGraph.js

@ -1,4 +1,3 @@
import { findDOMNode } from 'react-dom'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import * as d3 from 'd3'
@ -31,10 +30,10 @@ class CanvasNetworkGraph extends Component {
svgLoaded: false
}
this._startSimulation = this._startSimulation.bind(this)
this._zoomActions = this._zoomActions.bind(this)
this._ticked = this._ticked.bind(this)
this._restart = this._restart.bind(this)
this.startSimulation = this.startSimulation.bind(this)
this.zoomActions = this.zoomActions.bind(this)
this.ticked = this.ticked.bind(this)
this.restart = this.restart.bind(this)
}
componentWillReceiveProps(nextProps) {
@ -62,15 +61,15 @@ class CanvasNetworkGraph extends Component {
.attr('width', 800)
.attr('height', 800)
this._startSimulation()
this.startSimulation()
clearInterval(svgInterval)
}
}, 1000)
}
componentDidUpdate(prevProps, prevState) {
const {
componentDidUpdate(prevProps) {
const {
network: { nodes, edges },
selectedPeerPubkeys,
selectedChannelIds,
@ -88,15 +87,15 @@ class CanvasNetworkGraph extends Component {
}
if (prevProps.selectedPeerPubkeys.length !== selectedPeerPubkeys.length) {
this._updateSelectedPeers()
this.updateSelectedPeers()
}
if (prevProps.selectedChannelIds.length !== selectedChannelIds.length) {
this._updateSelectedChannels()
this.updateSelectedChannels()
}
if (prevProps.currentRouteChanIds.length !== currentRouteChanIds.length) {
this._renderSelectedRoute()
this.renderSelectedRoute()
}
}
@ -105,46 +104,46 @@ class CanvasNetworkGraph extends Component {
.remove()
}
_updateSelectedPeers() {
updateSelectedPeers() {
const { selectedPeerPubkeys } = this.props
// remove active class
d3.selectAll('.active-peer')
.each(function(d) {
.each(function () {
d3.select(this).classed('active-peer', false)
})
// add active class to all selected peers
selectedPeerPubkeys.forEach(pubkey => {
const node = d3.select(`#node-${pubkey}`).classed('active-peer', true)
selectedPeerPubkeys.forEach((pubkey) => {
d3.select(`#node-${pubkey}`).classed('active-peer', true)
})
}
_updateSelectedChannels() {
updateSelectedChannels() {
const { selectedChannelIds } = this.props
// remove active class
d3.selectAll('.active-channel')
.each(function(d) {
.each(function () {
d3.select(this).classed('active-channel', false)
})
// add active class to all selected peers
selectedChannelIds.forEach(chanid => {
const node = d3.select(`#link-${chanid}`).classed('active-channel', true)
selectedChannelIds.forEach((chanid) => {
d3.select(`#link-${chanid}`).classed('active-channel', true)
})
}
_renderSelectedRoute() {
renderSelectedRoute() {
const { currentRouteChanIds } = this.props
// remove all route animations before rendering new ones
d3.selectAll('.animated-route-circle')
.each(function(d) {
.each(function () {
d3.select(this).remove()
})
currentRouteChanIds.forEach(chanId => {
currentRouteChanIds.forEach((chanId) => {
const link = document.getElementById(`link-${chanId}`)
if (!link) { return }
@ -154,7 +153,7 @@ class CanvasNetworkGraph extends Component {
const y2 = link.y2.baseVal.value
// create the circle that represent btc traveling through a channel
const circle = this.g
this.g
.append('circle')
.attr('id', `circle-${chanId}`)
.attr('class', 'animated-route-circle')
@ -167,13 +166,13 @@ class CanvasNetworkGraph extends Component {
const repeat = () => {
d3.select(`#circle-${chanId}`)
.transition()
.attr('cx', x2 )
.attr('cy', y2 )
.attr('cx', x2)
.attr('cy', y2)
.duration(1000)
.transition()
.duration(1000)
.transition()
.duration(1000)
.attr('cx', x1)
.attr('cy', y1)
.attr('cx', x1)
.attr('cy', y1)
.on('end', repeat)
}
@ -182,13 +181,13 @@ class CanvasNetworkGraph extends Component {
})
}
_startSimulation() {
startSimulation() {
const { simulationData: { nodes, links } } = this.state
// grab the svg el along with the attributes
const svg = d3.select('#map'),
width = +svg.attr('width'),
height = +svg.attr('height')
const svg = d3.select('#map')
const width = +svg.attr('width')
const height = +svg.attr('height')
this.g = svg.append('g').attr('transform', `translate(${width / 2},${height / 2})`)
this.link = this.g.append('g').attr('stroke', 'white').attr('stroke-width', 1.5).selectAll('.link')
@ -198,22 +197,22 @@ class CanvasNetworkGraph extends Component {
.force('charge', d3.forceManyBody().strength(-750))
.force('link', d3.forceLink(links).id(d => d.pub_key).distance(500))
.force('collide', d3.forceCollide(300))
.on('tick', this._ticked)
.on('tick', this.ticked)
.on('end', () => {
this.setState({ svgLoaded: true })
})
// zoom
const zoom_handler = d3.zoom().on('zoom', this._zoomActions)
const zoom_handler = d3.zoom().on('zoom', this.zoomActions)
zoom_handler(svg)
this._restart()
this.restart()
}
_zoomActions() {
zoomActions() {
this.g.attr('transform', d3.event.transform)
}
_ticked() {
ticked() {
this.node.attr('cx', d => d.x)
.attr('cy', d => d.y)
@ -223,7 +222,7 @@ class CanvasNetworkGraph extends Component {
.attr('y2', d => d.target.y)
}
_restart() {
restart() {
const { identity_pubkey } = this.props
const { simulationData: { nodes, links } } = this.state
@ -231,23 +230,23 @@ class CanvasNetworkGraph extends Component {
this.node = this.node.data(nodes, d => d.pub_key)
this.node.exit().remove()
this.node = this.node.enter()
.append('circle')
.attr('stroke', d => 'silver')
.attr('fill', d => d.pub_key === identity_pubkey ? '#FFF' : '#353535')
.attr('r', d => 100)
.attr('id', d => `node-${d.pub_key}`)
.attr('class', 'network-node')
.merge(this.node)
.append('circle')
.attr('stroke', () => 'silver')
.attr('fill', d => d.pub_key === identity_pubkey ? '#FFF' : '#353535')
.attr('r', () => 100)
.attr('id', d => `node-${d.pub_key}`)
.attr('class', 'network-node')
.merge(this.node)
// Apply the general update pattern to the links.
this.link = this.link.data(links, d => `${d.source.id}-${d.target.id}`)
this.link.exit().remove()
this.link =
this.link =
this.link.enter()
.append('line')
.attr('id', d => `link-${d.channel_id}`)
.attr('class','network-link')
.merge(this.link)
.append('line')
.attr('id', d => `link-${d.channel_id}`)
.attr('class', 'network-link')
.merge(this.link)
// Update and restart the simulation.
this.simulation.nodes(nodes)
@ -261,13 +260,13 @@ class CanvasNetworkGraph extends Component {
return (
<div className={styles.mapContainer} id='mapContainer'>
{
!svgLoaded &&
!svgLoaded &&
<div className={styles.loadingContainer}>
<div className={styles.loadingWrap}>
<div className={styles.loader}></div>
<div className={styles.loaderbefore}></div>
<div className={styles.circular}></div>
<div className={`${styles.circular} ${styles.another}`}></div>
<div className={styles.loader} />
<div className={styles.loaderbefore} />
<div className={styles.circular} />
<div className={`${styles.circular} ${styles.another}`} />
<div className={styles.text}>loading</div>
</div>
</div>
@ -278,7 +277,13 @@ class CanvasNetworkGraph extends Component {
}
CanvasNetworkGraph.propTypes = {
network: PropTypes.object.isRequired
identity_pubkey: PropTypes.string.isRequired,
network: PropTypes.object.isRequired,
selectedPeerPubkeys: PropTypes.array.isRequired,
selectedChannelIds: PropTypes.array.isRequired,
currentRouteChanIds: PropTypes.array.isRequired
}
export default CanvasNetworkGraph
export default CanvasNetworkGraph

4
app/components/Network/ChannelsList.js

@ -38,7 +38,9 @@ const ChannelsList = ({ channels, updateSelectedChannels, selectedChannelIds })
)
ChannelsList.propTypes = {
channels: PropTypes.array.isRequired
channels: PropTypes.array.isRequired,
updateSelectedChannels: PropTypes.func.isRequired,
selectedChannelIds: PropTypes.array.isRequired
}
export default ChannelsList

4
app/components/Network/PeersList.js

@ -17,7 +17,9 @@ const PeersList = ({ peers, updateSelectedPeers, selectedPeerPubkeys }) => (
)
PeersList.propTypes = {
peers: PropTypes.array.isRequired
peers: PropTypes.array.isRequired,
updateSelectedPeers: PropTypes.func.isRequired,
selectedPeerPubkeys: PropTypes.array.isRequired
}
export default PeersList

5
app/components/Network/TransactionForm.js

@ -24,7 +24,7 @@ const TransactionForm = ({ updatePayReq, pay_req, loadingRoutes, payReqRoutes, s
<ul className={styles.routes}>
{
payReqRoutes.map((route, index) =>
payReqRoutes.map((route, index) =>
<li className={`${styles.route} ${currentRoute == route && styles.active}`} key={index} onClick={() => setCurrentRoute(route)}>
<header>
<h1>Route #{index + 1}</h1>
@ -54,7 +54,8 @@ TransactionForm.propTypes = {
pay_req: PropTypes.string.isRequired,
loadingRoutes: PropTypes.bool.isRequired,
payReqRoutes: PropTypes.array.isRequired,
setCurrentRoute: PropTypes.func.isRequired
setCurrentRoute: PropTypes.func.isRequired,
currentRoute: PropTypes.object.isRequired
}
export default TransactionForm

4
app/components/Wallet/ReceiveModal.js

@ -93,7 +93,9 @@ ReceiveModal.propTypes = {
hideActivityModal: PropTypes.func.isRequired,
pubkey: PropTypes.string.isRequired,
address: PropTypes.string.isRequired,
newAddress: PropTypes.func.isRequired
newAddress: PropTypes.func.isRequired,
changeQrCode: PropTypes.func.isRequired,
qrCodeType: PropTypes.number.isRequired
}
export default ReceiveModal

6
app/components/Wallet/Wallet.js

@ -29,11 +29,11 @@ class Wallet extends Component {
const { modalOpen, qrCodeType } = this.state
const changeQrCode = () => {
const qrCodeType = this.state.qrCodeType === 1 ? 2 : 1
const qrCodeNum = this.state.qrCodeType === 1 ? 2 : 1
this.setState({ qrCodeType })
this.setState({ qrCodeType: qrCodeNum })
}
return (
<div className={styles.wallet}>
{

16
app/lnd/methods/index.js

@ -46,20 +46,18 @@ export default function (lnd, event, msg, data) {
break
case 'getInvoiceAndQueryRoutes':
// Data looks like { pubkey: String, amount: Number }
invoicesController.getInvoice(lnd, { pay_req: data.payreq })
.then(invoiceData => {
console.log('invoiceData: ', invoiceData)
networkController.queryRoutes(lnd, { pubkey: invoiceData.destination , amount: invoiceData.num_satoshis })
.then(routes => {
console.log('routes: ', routes)
invoicesController.getInvoice(lnd, { pay_req: data.payreq })
.then((invoiceData) => {
networkController.queryRoutes(lnd, { pubkey: invoiceData.destination, amount: invoiceData.num_satoshis })
.then((routes) => {
event.sender.send('receiveInvoiceAndQueryRoutes', routes)
})
.catch(error => console.log('getInvoiceAndQueryRoutes queryRoutes error: ', error))
})
.catch(error => console.log('getInvoiceAndQueryRoutes invoice error: ', error))
break
break
case 'newaddress':
// Data looks like { address: '' }
// Data looks like { address: '' }
walletController.newAddress(lnd, data.type)
.then(({ address }) => event.sender.send('receiveAddress', address))
.catch(error => console.log('newaddress error: ', error))
@ -112,7 +110,7 @@ export default function (lnd, event, msg, data) {
case 'balance':
// Balance looks like [ { balance: '129477456' }, { balance: '243914' } ]
Promise.all([walletController.walletBalance, channelController.channelBalance].map(func => func(lnd)))
.then(balance => {
.then((balance) => {
event.sender.send('receiveBalance', { walletBalance: balance[0].total_balance, channelBalance: balance[1].balance })
})
.catch(error => console.log('balance error: ', error))

42
app/lnd/utils/index.js

@ -1,42 +0,0 @@
import zbase32 from 'zbase32'
function convertBigEndianBufferToLong(longBuffer) {
let longValue = 0
const byteArray = Buffer.from(longBuffer).swap64()
for (let i = byteArray.length - 1; i >= 0; i -= 1) {
longValue = (longValue * 256) + byteArray[i]
}
return longValue
}
export function decodeInvoice(payreq) {
const payreqBase32 = zbase32.decode(payreq)
const bufferHexRotated = Buffer.from(payreqBase32).toString('hex')
const bufferHex = bufferHexRotated.substr(bufferHexRotated.length - 1, bufferHexRotated.length)
+ bufferHexRotated.substr(0, bufferHexRotated.length - 1)
const buffer = Buffer.from(bufferHex, 'hex')
const pubkeyBuffer = buffer.slice(0, 33)
const pubkey = pubkeyBuffer.toString('hex')
const paymentHashBuffer = buffer.slice(33, 65)
const paymentHashHex = paymentHashBuffer.toString('hex')
const valueBuffer = buffer.slice(65, 73)
const amount = convertBigEndianBufferToLong(valueBuffer)
return {
payreq,
pubkey,
amount,
r_hash: paymentHashHex
}
}
export default {
decodeInvoice
}

11
app/reducers/network.js

@ -144,13 +144,12 @@ export const queryRoutes = (pubkey, amount) => (dispatch) => {
export const receiveQueryRoutes = (event, { routes }) => dispatch => dispatch({ type: RECEIVE_QUERY_ROUTES, routes })
// take a payreq and query routes for it
export const fetchInvoiceAndQueryRoutes = (payreq) => (dispatch) => {
export const fetchInvoiceAndQueryRoutes = payreq => (dispatch) => {
dispatch(getInvoiceAndQueryRoutes())
ipcRenderer.send('lnd', { msg: 'getInvoiceAndQueryRoutes', data: { payreq } })
}
export const receiveInvoiceAndQueryRoutes = (event, { routes }) => dispatch => {
console.log('routes: ', routes)
dispatch({ type: RECEIVE_INFO_AND_QUERY_ROUTES, routes })
}
// ------------------------------------
@ -179,11 +178,11 @@ const ACTION_HANDLERS = {
[UPDATE_PAY_REQ]: (state, { pay_req }) => ({ ...state, pay_req }),
[RESET_PAY_REQ]: state => ({ ...state, pay_req: '' }),
[GET_INFO_AND_QUERY_ROUTES]: state => ({ ...state, fetchingInvoiceAndQueryingRoutes: true }),
[RECEIVE_INFO_AND_QUERY_ROUTES]: (state, { routes }) => ({ ...state, fetchingInvoiceAndQueryingRoutes: false, payReqRoutes: routes }),
[CLEAR_QUERY_ROUTES]: state => ({ ...state, payReqRoutes: [], currentRoute: {} }),
[UPDATE_SELECTED_PEERS]: (state, { peer }) => {
let selectedPeers
@ -203,7 +202,7 @@ const ACTION_HANDLERS = {
[UPDATE_SELECTED_CHANNELS]: (state, { channel }) => {
let selectedChannels
if (state.selectedChannels.includes(channel)) {
selectedChannels = state.selectedChannels.filter(selectedChannel => selectedChannel.chan_id !== channel.chan_id)
}
@ -216,7 +215,7 @@ const ACTION_HANDLERS = {
...state, selectedChannels
}
},
[CLEAR_SELECTED_CHANNELS]: state => ({ ...state, selectedChannels: [] }),
[CLEAR_SELECTED_CHANNELS]: state => ({ ...state, selectedChannels: [] })
}
// ------------------------------------

1
app/routes/activity/components/Activity.js

@ -127,6 +127,7 @@ Activity.propTypes = {
fetchPayments: PropTypes.func.isRequired,
fetchInvoices: PropTypes.func.isRequired,
fetchTransactions: PropTypes.func.isRequired,
fetchBalance: PropTypes.func.isRequired,
ticker: PropTypes.object.isRequired,
searchInvoices: PropTypes.func.isRequired,

1
app/routes/activity/components/components/Modal/Invoice/Invoice.js

@ -8,7 +8,6 @@ import QRCode from 'qrcode.react'
import { FaCircle } from 'react-icons/lib/fa'
import CurrencyIcon from 'components/CurrencyIcon'
import { btc } from 'utils'
import styles from './Invoice.scss'

3
app/routes/activity/components/components/Modal/Modal.js

@ -1,13 +1,12 @@
import React from 'react'
import PropTypes from 'prop-types'
import ReactModal from 'react-modal'
import { MdClose } from 'react-icons/lib/md'
import Transaction from './Transaction'
import Payment from './Payment'
import Invoice from './Invoice'
import { MdClose } from 'react-icons/lib/md'
import styles from './Modal.scss'
const Modal = ({ modalType, modalProps, hideActivityModal, ticker, currentTicker }) => {

1
app/routes/activity/components/components/Modal/Payment/Payment.js

@ -4,7 +4,6 @@ import PropTypes from 'prop-types'
import Moment from 'react-moment'
import 'moment-timezone'
import CurrencyIcon from 'components/CurrencyIcon'
import { btc } from 'utils'
import styles from './Payment.scss'

9
app/routes/activity/components/components/Modal/Transaction/Transaction.js

@ -5,7 +5,6 @@ import PropTypes from 'prop-types'
import Moment from 'react-moment'
import 'moment-timezone'
import CurrencyIcon from 'components/CurrencyIcon'
import { btc } from 'utils'
import styles from './Transaction.scss'
@ -43,10 +42,10 @@ const Transaction = ({ transaction, ticker, currentTicker }) => (
<dt>Fee</dt>
<dd>
{
ticker.currency === 'usd' ?
btc.satoshisToUsd(transaction.total_fees)
:
btc.satoshisToBtc(transaction.total_fees)
ticker.currency === 'usd' ?
btc.satoshisToUsd(transaction.total_fees)
:
btc.satoshisToBtc(transaction.total_fees)
}
</dd>
<dt>Date</dt>

3
app/routes/app/components/App.js

@ -22,7 +22,6 @@ class App extends Component {
hideModal,
ticker,
currentTicker,
balance,
form,
openPayForm,
@ -67,7 +66,6 @@ class App extends Component {
App.propTypes = {
modal: PropTypes.object.isRequired,
ticker: PropTypes.object.isRequired,
balance: PropTypes.object.isRequired,
form: PropTypes.object.isRequired,
formProps: PropTypes.object.isRequired,
closeForm: PropTypes.func.isRequired,
@ -77,7 +75,6 @@ App.propTypes = {
fetchInfo: PropTypes.func.isRequired,
hideModal: PropTypes.func.isRequired,
fetchTicker: PropTypes.func.isRequired,
fetchBalance: PropTypes.func.isRequired,
openPayForm: PropTypes.func.isRequired,
openRequestForm: PropTypes.func.isRequired,
clearError: PropTypes.func.isRequired,

3
app/routes/app/containers/AppContainer.js

@ -2,7 +2,6 @@ import { withRouter } from 'react-router'
import { connect } from 'react-redux'
import { fetchTicker, setCurrency, tickerSelectors } from 'reducers/ticker'
import { newAddress } from 'reducers/address'
import { fetchBalance } from 'reducers/balance'
import { fetchInfo } from 'reducers/info'
@ -27,7 +26,6 @@ const mapDispatchToProps = {
fetchTicker,
setCurrency,
newAddress,
fetchBalance,
fetchInfo,
@ -58,7 +56,6 @@ const mapStateToProps = state => ({
ticker: state.ticker,
address: state.address,
balance: state.balance,
info: state.info,
payment: state.payment,
transaction: state.transaction,

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

@ -58,7 +58,7 @@ class Channels extends Component {
this.setState({ refreshing: true })
// store event in icon so we dont get an error when react clears it
const icon = this.refs.repeat.childNodes
const icon = this.repeat.childNodes
// fetch peers
fetchChannels()
@ -127,7 +127,7 @@ class Channels extends Component {
</ul>
</section>
<section className={styles.refreshContainer}>
<span className={styles.refresh} onClick={refreshClicked} ref='repeat'>
<span className={styles.refresh} onClick={refreshClicked} ref={(ref) => (this.repeat = ref)}>
{
this.state.refreshing ?
<FaRepeat />

30
app/routes/network/components/Network.js

@ -36,7 +36,7 @@ class Network extends Component {
clearQueryRoutes()
resetPayReq()
clearSelectedChannels()
clearSelectedPeers()
clearSelectedPeers()
}
render() {
@ -50,7 +50,7 @@ class Network extends Component {
currentRouteChanIds,
peers: { peers },
activeChannels,
selectedChannelIds,
updateSelectedChannels,
@ -61,13 +61,11 @@ class Network extends Component {
} = this.props
const renderContent = () => {
switch(network.currentTab) {
switch (network.currentTab) {
case 1:
return <PeersList peers={peers} updateSelectedPeers={updateSelectedPeers} selectedPeerPubkeys={selectedPeerPubkeys} />
break
case 2:
return <ChannelsList channels={activeChannels} updateSelectedChannels={updateSelectedChannels} selectedChannelIds={selectedChannelIds} />
break
case 3:
return (
<TransactionForm
@ -79,7 +77,8 @@ class Network extends Component {
currentRoute={network.currentRoute}
/>
)
break
default:
return <span />
}
}
@ -129,11 +128,28 @@ Network.propTypes = {
fetchDescribeNetwork: PropTypes.func.isRequired,
fetchPeers: PropTypes.func.isRequired,
setCurrentTab: PropTypes.func.isRequired,
fetchChannels: PropTypes.func.isRequired,
fetchInvoiceAndQueryRoutes: PropTypes.func.isRequired,
clearQueryRoutes: PropTypes.func.isRequired,
resetPayReq: PropTypes.func.isRequired,
clearSelectedChannels: PropTypes.func.isRequired,
clearSelectedPeers: PropTypes.func.isRequired,
updateSelectedPeers: PropTypes.func.isRequired,
setCurrentRoute: PropTypes.func.isRequired,
updateSelectedChannels: PropTypes.func.isRequired,
updatePayReq: PropTypes.func.isRequired,
network: PropTypes.object.isRequired,
peers: PropTypes.object.isRequired,
identity_pubkey: PropTypes.string.isRequired
selectedPeerPubkeys: PropTypes.array.isRequired,
currentRouteChanIds: PropTypes.array.isRequired,
activeChannels: PropTypes.array.isRequired,
selectedChannelIds: PropTypes.array.isRequired,
identity_pubkey: PropTypes.string.isRequired,
payReqIsLn: PropTypes.bool.isRequired
}
export default Network

4
app/routes/network/containers/NetworkContainer.js

@ -30,7 +30,7 @@ import Network from '../components/Network'
const mapDispatchToProps = {
fetchDescribeNetwork,
setCurrentTab,
updateSelectedPeers,
clearSelectedPeers,
@ -39,7 +39,7 @@ const mapDispatchToProps = {
setCurrentRoute,
clearQueryRoutes,
resetPayReq,
fetchPeers,
fetchChannels,

4
app/routes/peers/components/Peers.js

@ -42,7 +42,7 @@ class Peers extends Component {
this.setState({ refreshing: true })
// store event in icon so we dont get an error when react clears it
const icon = this.refs.repeat.childNodes
const icon = this.repeat.childNodes
// fetch peers
fetchPeers()
@ -98,7 +98,7 @@ class Peers extends Component {
</div>
<div className={styles.refreshContainer}>
<span className={styles.refresh} onClick={refreshClicked} ref='repeat'>
<span className={styles.refresh} onClick={refreshClicked} ref={(ref) => (this.repeat = ref)}>
{
this.state.refreshing ?
<FaRepeat />

BIN
resources/bin/darwin/lnd

Binary file not shown.
Loading…
Cancel
Save