Browse Source

fix(wallet-address): fix small linting errors

renovate/lint-staged-8.x
Jack Mallers 8 years ago
parent
commit
c6d7fdea27
  1. 1
      app/lnd/methods/index.js
  2. 2
      app/reducers/address.js
  3. 9
      app/routes/wallet/components/Wallet.js

1
app/lnd/methods/index.js

@ -24,6 +24,7 @@ export default function (lnd, event, msg, data) {
.catch(error => console.log('info error: ', error)) .catch(error => console.log('info error: ', error))
break break
case 'newaddress': case 'newaddress':
// Data looks like { address: '' }
newaddress(lnd, data.type) newaddress(lnd, data.type)
.then(({ address }) => event.sender.send('receiveAddress', address)) .then(({ address }) => event.sender.send('receiveAddress', address))
.catch(error => console.log('newaddress error: ', error)) .catch(error => console.log('newaddress error: ', error))

2
app/reducers/address.js

@ -22,7 +22,7 @@ export function getAddress() {
} }
// Send IPC event for getinfo // Send IPC event for getinfo
export const newAddress = (type) => async (dispatch) => { export const newAddress = type => async (dispatch) => {
dispatch(getAddress()) dispatch(getAddress())
ipcRenderer.send('lnd', { msg: 'newaddress', data: { type: addressTypes[type] } }) ipcRenderer.send('lnd', { msg: 'newaddress', data: { type: addressTypes[type] } })
} }

9
app/routes/wallet/components/Wallet.js

@ -18,7 +18,7 @@ class Wallet extends Component {
render() { render() {
const { const {
info, info,
address: { addressLoading, address }, address: { address },
ticker, ticker,
peers: { peersLoading, peers, peer, peerForm }, peers: { peersLoading, peers, peer, peerForm },
channels: { channelsLoading, channels, channel, channelForm, pendingChannels }, channels: { channelsLoading, channels, channel, channelForm, pendingChannels },
@ -31,8 +31,7 @@ class Wallet extends Component {
connectRequest, connectRequest,
disconnectRequest, disconnectRequest,
allChannels, allChannels,
openChannel, openChannel
newAddress
} = this.props } = this.props
return ( return (
@ -99,7 +98,9 @@ Wallet.propTypes = {
connectRequest: PropTypes.func.isRequired, connectRequest: PropTypes.func.isRequired,
disconnectRequest: PropTypes.func.isRequired, disconnectRequest: PropTypes.func.isRequired,
allChannels: PropTypes.array.isRequired, allChannels: PropTypes.array.isRequired,
openChannel: PropTypes.func.isRequired openChannel: PropTypes.func.isRequired,
newAddress: PropTypes.func.isRequired,
address: PropTypes.string.isRequired
} }

Loading…
Cancel
Save