Browse Source

fix(lint): fix linting errors

renovate/lint-staged-8.x
Jack Mallers 8 years ago
parent
commit
6713d1d15d
  1. 1
      app/lnd/push/closechannel.js
  2. 16
      app/reducers/channels.js
  3. 2
      app/reducers/ipc.js
  4. 8
      app/routes/wallet/components/components/Channels/Channels.js
  5. 6
      test/reducers/__snapshots__/channels.spec.js.snap

1
app/lnd/push/closechannel.js

@ -10,7 +10,6 @@ export default function pushclosechannel(lnd, event, payload) {
resolve(null, payload)
} catch (error) {
console.log('error: ', error)
reject(error, null)
}
})

16
app/reducers/channels.js

@ -111,7 +111,19 @@ export const pushchannelstatus = () => (dispatch) => {
export const closeChannel = ({ channel_point }) => (dispatch) => {
dispatch(closingChannel())
const channelPoint = channel_point.split(':')
ipcRenderer.send('lnd', { msg: 'closeChannel', data: { channel_point: { funding_txid: channelPoint[0], output_index: channelPoint[1] }, force: true } })
ipcRenderer.send(
'lnd',
{
msg: 'closeChannel',
data: {
channel_point: {
funding_txid: channelPoint[0],
output_index: channelPoint[1]
},
force: true
}
}
)
}
// TODO: Decide how to handle streamed updates for closing channels
@ -203,7 +215,7 @@ const initialState = {
push_amt: ''
},
openingChannel: false,
closeChannel: false
closingChannel: false
}
export default function channelsReducer(state = initialState, action) {

2
app/reducers/ipc.js

@ -16,7 +16,7 @@ import {
pushclosechannelupdated,
pushclosechannelend,
pushclosechannelerror,
pushclosechannelstatus,
pushclosechannelstatus
} from './channels'
import { receivePayments, paymentSuccessful } from './payment'

8
app/routes/wallet/components/components/Channels/Channels.js

@ -24,7 +24,13 @@ const Channels = ({
explorerLinkBase
}) => (
<div className={styles.channels}>
<ChannelModal isOpen={channelModalOpen} resetChannel={setChannel} channel={modalChannel} explorerLinkBase={explorerLinkBase} closeChannel={closeChannel} />
<ChannelModal
isOpen={channelModalOpen}
resetChannel={setChannel}
channel={modalChannel}
explorerLinkBase={explorerLinkBase}
closeChannel={closeChannel}
/>
<ChannelForm form={channelForm} setForm={setChannelForm} ticker={ticker} peers={peers} openChannel={openChannel} currentTicker={currentTicker} />
<div className={styles.header}>
<h3>Channels</h3>

6
test/reducers/__snapshots__/channels.spec.js.snap

@ -11,6 +11,7 @@ Object {
},
"channels": Array [],
"channelsLoading": true,
"closingChannel": false,
"openingChannel": false,
"pendingChannels": Object {
"pending_closing_channels": Array [],
@ -32,6 +33,7 @@ Object {
},
"channels": Array [],
"channelsLoading": false,
"closingChannel": false,
"openingChannel": true,
"pendingChannels": Object {
"pending_closing_channels": Array [],
@ -56,6 +58,7 @@ Object {
2,
],
"channelsLoading": false,
"closingChannel": false,
"openingChannel": false,
"pendingChannels": Array [
3,
@ -75,6 +78,7 @@ Object {
},
"channels": Array [],
"channelsLoading": false,
"closingChannel": false,
"openingChannel": false,
"pendingChannels": Object {
"pending_closing_channels": Array [],
@ -96,6 +100,7 @@ Object {
},
"channels": Array [],
"channelsLoading": false,
"closingChannel": false,
"openingChannel": false,
"pendingChannels": Object {
"pending_closing_channels": Array [],
@ -117,6 +122,7 @@ Object {
},
"channels": Array [],
"channelsLoading": false,
"closingChannel": false,
"openingChannel": false,
"pendingChannels": Object {
"pending_closing_channels": Array [],

Loading…
Cancel
Save