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
  4. 2
      app/routes/wallet/containers/WalletContainer.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))
break
case 'newaddress':
// Data looks like { address: '' }
newaddress(lnd, data.type)
.then(({ address }) => event.sender.send('receiveAddress', address))
.catch(error => console.log('newaddress error: ', error))

2
app/reducers/address.js

@ -22,7 +22,7 @@ export function getAddress() {
}
// Send IPC event for getinfo
export const newAddress = (type) => async (dispatch) => {
export const newAddress = type => async (dispatch) => {
dispatch(getAddress())
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() {
const {
info,
address: { addressLoading, address },
address: { address },
ticker,
peers: { peersLoading, peers, peer, peerForm },
channels: { channelsLoading, channels, channel, channelForm, pendingChannels },
@ -31,8 +31,7 @@ class Wallet extends Component {
connectRequest,
disconnectRequest,
allChannels,
openChannel,
newAddress
openChannel
} = this.props
return (
@ -99,7 +98,9 @@ Wallet.propTypes = {
connectRequest: PropTypes.func.isRequired,
disconnectRequest: PropTypes.func.isRequired,
allChannels: PropTypes.array.isRequired,
openChannel: PropTypes.func.isRequired
openChannel: PropTypes.func.isRequired,
newAddress: PropTypes.func.isRequired,
address: PropTypes.string.isRequired
}

2
app/routes/wallet/containers/WalletContainer.js

@ -21,7 +21,7 @@ import Wallet from '../components/Wallet'
const mapDispatchToProps = {
newAddress,
fetchInfo,
fetchPeers,

Loading…
Cancel
Save