diff --git a/app/components/GlobalError/GlobalError.js b/app/components/GlobalError/GlobalError.js
index 6fffab17..75f09a1e 100644
--- a/app/components/GlobalError/GlobalError.js
+++ b/app/components/GlobalError/GlobalError.js
@@ -15,7 +15,6 @@ const GlobalError = ({ error, clearError }) => (
)
-
GlobalError.propTypes = {
error: PropTypes.string,
clearError: PropTypes.func.isRequired
diff --git a/app/components/GlobalError/index.js b/app/components/GlobalError/index.js
index 41eb98ac..66303b76 100644
--- a/app/components/GlobalError/index.js
+++ b/app/components/GlobalError/index.js
@@ -1,3 +1,3 @@
import GlobalError from './GlobalError'
-export default GlobalError
\ No newline at end of file
+export default GlobalError
diff --git a/app/components/Nav/Nav.js b/app/components/Nav/Nav.js
index b274c99e..3fe72ff0 100644
--- a/app/components/Nav/Nav.js
+++ b/app/components/Nav/Nav.js
@@ -2,10 +2,7 @@ import path from 'path'
import React from 'react'
import PropTypes from 'prop-types'
import { NavLink } from 'react-router-dom'
-import ReactSVG from 'react-svg'
import Isvg from 'react-inlinesvg'
-import { MdAccountBalanceWallet } from 'react-icons/lib/md'
-import { FaClockO, FaBolt } from 'react-icons/lib/fa'
import styles from './Nav.scss'
const Nav = ({ openPayForm, openRequestForm }) => (
@@ -16,32 +13,28 @@ const Nav = ({ openPayForm, openRequestForm }) => (
-
-
+
-
Wallet
-
-
+
-
Peers
-
-
+
-
Channels
-
-
+
-
Settings
diff --git a/app/components/Wallet/Wallet.js b/app/components/Wallet/Wallet.js
index 2e03a77c..dfcd06be 100644
--- a/app/components/Wallet/Wallet.js
+++ b/app/components/Wallet/Wallet.js
@@ -3,7 +3,6 @@ import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { FaQrcode } from 'react-icons/lib/fa'
import Isvg from 'react-inlinesvg'
-import CryptoIcon from 'components/CryptoIcon'
import { btc } from 'utils'
import ReceiveModal from './ReceiveModal'
import styles from './Wallet.scss'
@@ -19,7 +18,6 @@ class Wallet extends Component {
render() {
const {
- ticker,
balance,
address,
info
@@ -64,7 +62,6 @@ class Wallet extends Component {
}
Wallet.propTypes = {
- ticker: PropTypes.object.isRequired,
balance: PropTypes.object.isRequired,
address: PropTypes.string.isRequired,
info: PropTypes.object.isRequired
diff --git a/app/lnd/methods/index.js b/app/lnd/methods/index.js
index 0d0dd348..98e82106 100644
--- a/app/lnd/methods/index.js
+++ b/app/lnd/methods/index.js
@@ -105,7 +105,7 @@ export default function (lnd, event, msg, data) {
})
)
)
- .catch(error => {
+ .catch((error) => {
console.log('addInvoice error: ', error)
event.sender.send('invoiceFailed', { error: error.toString() })
})
@@ -115,7 +115,7 @@ export default function (lnd, event, msg, data) {
// { paymentRequest } = data
paymentsController.sendPaymentSync(lnd, data)
.then(({ payment_route }) => event.sender.send('paymentSuccessful', Object.assign(data, { payment_route })))
- .catch(error => {
+ .catch((error) => {
console.log('payinvoice error: ', error)
event.sender.send('paymentFailed', { error: error.toString() })
})
@@ -125,7 +125,7 @@ export default function (lnd, event, msg, data) {
// { amount, addr } = data
walletController.sendCoins(lnd, data)
.then(({ txid }) => event.sender.send('transactionSuccessful', { amount: data.amount, addr: data.addr, txid }))
- .catch(error => {
+ .catch((error) => {
console.log('error: ', error)
event.sender.send('transactionError', { error: error.toString() })
})
@@ -158,7 +158,7 @@ export default function (lnd, event, msg, data) {
console.log('peer_id: ', peer_id)
event.sender.send('connectSuccess', { pub_key: data.pubkey, address: data.host, peer_id })
})
- .catch(error => {
+ .catch((error) => {
event.sender.send('connectFailure', { error: error.toString() })
console.log('connectPeer error: ', error)
})
diff --git a/app/reducers/channels.js b/app/reducers/channels.js
index 863c4156..74b6cf78 100644
--- a/app/reducers/channels.js
+++ b/app/reducers/channels.js
@@ -90,7 +90,6 @@ export const channelSuccessful = () => (dispatch) => {
// Receive IPC event for updated channel
export const pushchannelupdated = () => (dispatch) => {
- console.log('channelUpdatedData: ', channelUpdatedData)
dispatch(fetchChannels())
}
@@ -174,7 +173,7 @@ const ACTION_HANDLERS = {
[OPENING_CHANNEL]: state => ({ ...state, openingChannel: true }),
[OPENING_FAILURE]: state => ({ ...state, openingChannel: false }),
-
+
[CLOSING_CHANNEL]: state => ({ ...state, closingChannel: true })
}
diff --git a/app/reducers/invoice.js b/app/reducers/invoice.js
index 795544c9..84ee9356 100644
--- a/app/reducers/invoice.js
+++ b/app/reducers/invoice.js
@@ -112,7 +112,7 @@ export const createdInvoice = (event, invoice) => (dispatch) => {
dispatch(resetRequestForm())
}
-export const invoiceFailed = (event, { error }) => dispatch => {
+export const invoiceFailed = (event, { error }) => (dispatch) => {
dispatch({ type: INVOICE_FAILED })
dispatch(setError(error))
}
diff --git a/app/reducers/peers.js b/app/reducers/peers.js
index 5b7060f7..897e0767 100644
--- a/app/reducers/peers.js
+++ b/app/reducers/peers.js
@@ -79,7 +79,7 @@ export const connectRequest = ({ pubkey, host }) => (dispatch) => {
export const connectSuccess = (event, peer) => dispatch => dispatch({ type: CONNECT_SUCCESS, peer })
// Send IPC receive for unsuccessfully connecting to a peer
-export const connectFailure = (event, { error }) => dispatch => {
+export const connectFailure = (event, { error }) => (dispatch) => {
dispatch({ type: CONNECT_FAILURE })
dispatch(setError(error))
}
diff --git a/app/routes/app/components/App.js b/app/routes/app/components/App.js
index f1485478..3b0bee55 100644
--- a/app/routes/app/components/App.js
+++ b/app/routes/app/components/App.js
@@ -79,7 +79,6 @@ class App extends Component {
{},
closeChannel: () => {},
+ fetchChannels: () => {},
currentTicker: {},
explorerLinkBase: 'https://testnet.smartbit.com.au'
}
diff --git a/test/components/Nav.spec.js b/test/components/Nav.spec.js
index c55a1d94..dbe0e4cb 100644
--- a/test/components/Nav.spec.js
+++ b/test/components/Nav.spec.js
@@ -22,27 +22,11 @@ describe('default elements', () => {
const props = { ...defaultProps }
const el = shallow()
- describe('currencies', () => {
- it('should render currency conversion links', () => {
- expect(el.find('.currencies').length).toBe(1)
- expect(el.find(FaDollar).length).toBe(1)
- })
- })
-
- describe('balances', () => {
- expect(el.find('.balance').length).toBe(1)
- it('should render wallet balance', () => {})
- it('should render channel balance', () => {})
- })
-
- it('should render logo', () => {
- expect(el.find(ReactSVG).props().path).toContain('zap_2.svg')
- })
it('should render nav links', () => {
expect(el.find(NavLink).at(0).props().to).toBe('/')
expect(el.find(NavLink).at(1).props().to).toBe('/wallet')
- expect(el.find(FaClockO)).toHaveLength(1)
- expect(el.find(MdAccountBalanceWallet)).toHaveLength(1)
+ expect(el.find(NavLink).at(2).props().to).toBe('/channels')
+ expect(el.find(NavLink).at(3).props().to).toBe('/settings')
})
it('should render buttons', () => {
expect(el.find('.button').at(0).text()).toContain('Pay')
diff --git a/test/components/Peers.spec.js b/test/components/Peers.spec.js
index 20fdda04..d31763ea 100644
--- a/test/components/Peers.spec.js
+++ b/test/components/Peers.spec.js
@@ -19,7 +19,8 @@ const defaultProps = {
resetPeer: () => {},
disconnect: () => {},
form: {},
- setForm: () => {}
+ setForm: () => {},
+ fetchPeers: () => {}
}
const peer = {