Browse Source

fix(lint): fix lint errors

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
4f97d1311b
  1. 4
      app/components/ChannelForm/Footer.js
  2. 3
      app/components/ChannelForm/StepOne.js
  3. 2
      app/components/ChannelForm/StepThree.js
  4. 2
      app/components/ChannelForm/StepTwo.js
  5. 4
      app/components/Channels/Channel.js
  6. 7
      app/components/Channels/ChannelForm.js
  7. 4
      app/components/Channels/ChannelModal.js
  8. 4
      app/components/Channels/ClosedPendingChannel.js
  9. 4
      app/components/Channels/OpenPendingChannel.js
  10. 2
      app/components/Contacts/ClosingContact.js
  11. 4
      app/components/Contacts/ContactModal.js
  12. 30
      app/components/Contacts/ContactsForm.js
  13. 16
      app/components/Contacts/Donut.js
  14. 2
      app/components/Contacts/LoadingContact.js
  15. 2
      app/components/Contacts/OfflineContact.js
  16. 2
      app/components/Contacts/OnlineContact.js
  17. 2
      app/components/Contacts/PendingContact.js
  18. 4
      app/components/Form/PayForm.js
  19. 4
      app/components/ModalRoot/ModalRoot.js
  20. 4
      app/components/ModalRoot/SuccessfulSendCoins.js
  21. 4
      app/components/Network/TransactionForm.js
  22. 4
      app/components/Peers/PeerModal.js
  23. 4
      app/components/Wallet/ReceiveModal.js
  24. 2
      app/components/Wallet/Wallet.js
  25. 61
      app/lnd/methods/channelController.js
  26. 6
      app/lnd/methods/index.js
  27. 4
      app/reducers/balance.js
  28. 12
      app/reducers/channels.js
  29. 2
      app/reducers/invoice.js
  30. 4
      app/reducers/network.js
  31. 8
      app/reducers/peers.js
  32. 4
      app/reducers/ticker.js
  33. 4
      app/reducers/transaction.js
  34. 4
      app/routes/activity/components/Activity.js
  35. 4
      app/routes/activity/components/components/Invoice/Invoice.js
  36. 4
      app/routes/activity/components/components/Modal/Modal.js
  37. 4
      app/routes/activity/components/components/Payment/Payment.js
  38. 4
      app/routes/activity/components/components/Transaction/Transaction.js
  39. 4
      app/routes/contacts/components/Contacts.js
  40. 8
      app/routes/network/components/Network.js
  41. 8
      internals/scripts/CheckBuiltsExist.js

4
app/components/ChannelForm/Footer.js

@ -2,7 +2,9 @@ import React from 'react'
import PropTypes from 'prop-types'
import styles from './Footer.scss'
const Footer = ({ step, changeStep, stepTwoIsValid, submit }) => {
const Footer = ({
step, changeStep, stepTwoIsValid, submit
}) => {
if (step === 1) { return null }
// See if the next button on step 2 should be active

3
app/components/ChannelForm/StepOne.js

@ -58,8 +58,7 @@ class StepOne extends Component {
<h4>{peer.address}</h4>
<h1>{peer.pub_key}</h1>
</li>
)
)}
))}
</ul>
</div>
)

2
app/components/ChannelForm/StepThree.js

@ -20,7 +20,7 @@ class StepThree extends Component {
<form>
<label htmlFor='amount'>
<CurrencyIcon currency={'btc'} crypto={'btc'} />
<CurrencyIcon currency='btc' crypto='btc' />
</label>
<input
type='number'

2
app/components/ChannelForm/StepTwo.js

@ -19,7 +19,7 @@ class StepTwo extends Component {
<form>
<label htmlFor='amount'>
<CurrencyIcon currency={'btc'} crypto={'btc'} />
<CurrencyIcon currency='btc' crypto='btc' />
</label>
<input
type='number'

4
app/components/Channels/Channel.js

@ -4,7 +4,9 @@ import { FaCircle } from 'react-icons/lib/fa'
import { btc } from 'utils'
import styles from './Channel.scss'
const Channel = ({ ticker, channel, closeChannel, currentTicker }) => (
const Channel = ({
ticker, channel, closeChannel, currentTicker
}) => (
<li className={styles.channel}>
<header className={styles.header}>
<div>

7
app/components/Channels/ChannelForm.js

@ -6,7 +6,9 @@ import CurrencyIcon from 'components/CurrencyIcon'
import { usd, btc } from 'utils'
import styles from './ChannelForm.scss'
const ChannelForm = ({ form, setForm, ticker, peers, openChannel, currentTicker }) => {
const ChannelForm = ({
form, setForm, ticker, peers, openChannel, currentTicker
}) => {
const submitClicked = () => {
const { node_key, local_amt, push_amt } = form
@ -99,8 +101,7 @@ const ChannelForm = ({ form, setForm, ticker, peers, openChannel, currentTicker
<h4>{peer.address}</h4>
<h1>{peer.pub_key}</h1>
</li>
)
)
))
:
null
}

4
app/components/Channels/ChannelModal.js

@ -4,7 +4,9 @@ import PropTypes from 'prop-types'
import ReactModal from 'react-modal'
import styles from './ChannelModal.scss'
const ChannelModal = ({ isOpen, resetChannel, channel, explorerLinkBase, closeChannel }) => {
const ChannelModal = ({
isOpen, resetChannel, channel, explorerLinkBase, closeChannel
}) => {
const customStyles = {
overlay: {
cursor: 'pointer',

4
app/components/Channels/ClosedPendingChannel.js

@ -4,7 +4,9 @@ import PropTypes from 'prop-types'
import { btc } from 'utils'
import styles from './ClosedPendingChannel.scss'
const ClosedPendingChannel = ({ ticker, channel: { channel, closing_txid }, currentTicker, explorerLinkBase }) => (
const ClosedPendingChannel = ({
ticker, channel: { channel, closing_txid }, currentTicker, explorerLinkBase
}) => (
<li className={styles.channel} onClick={() => shell.openExternal(`${explorerLinkBase}/tx/${closing_txid}`)}>
<h1 className={styles.closing}>Closing Channel...</h1>
<div className={styles.left}>

4
app/components/Channels/OpenPendingChannel.js

@ -4,7 +4,9 @@ import PropTypes from 'prop-types'
import { btc } from 'utils'
import styles from './OpenPendingChannel.scss'
const OpenPendingChannel = ({ ticker, channel, currentTicker, explorerLinkBase }) => (
const OpenPendingChannel = ({
ticker, channel, currentTicker, explorerLinkBase
}) => (
<li className={styles.channel} onClick={() => shell.openExternal(`${explorerLinkBase}/tx/${channel.channel.channel_point.split(':')[0]}`)}>
<div className={styles.pending}>
<h1>Opening Channel...</h1>

2
app/components/Contacts/ClosingContact.js

@ -33,7 +33,7 @@ const ClosingContact = ({ channel }) => (
)
ClosingContact.propTypes = {
}
export default ClosingContact

4
app/components/Contacts/ContactModal.js

@ -69,7 +69,7 @@ const ContactModal = ({
</span>
</div>
</header>
<section className={styles.title}>
{
node &&
@ -124,7 +124,7 @@ const ContactModal = ({
}
ContactModal.propTypes = {
}
export default ContactModal

30
app/components/Contacts/ContactsForm.js

@ -139,12 +139,11 @@ class ContactsForm extends React.Component {
<ul className={styles.networkResults}>
{
contactsform.searchQuery.length > 0 && filteredNetworkNodes.map(node => {
return (
<li key={node.pub_key}>
<section>
{
node.alias.length > 0 ?
contactsform.searchQuery.length > 0 && filteredNetworkNodes.map(node => (
<li key={node.pub_key}>
<section>
{
node.alias.length > 0 ?
<h2>
<span>{node.alias.trim()}</span>
<span>({node.pub_key.substr(0, 10)}...{node.pub_key.substr(node.pub_key.length - 10)})</span>
@ -154,13 +153,12 @@ class ContactsForm extends React.Component {
<span>{node.pub_key}</span>
</h2>
}
</section>
<section>
{renderRightSide(node)}
</section>
</li>
)
})
</section>
<section>
{renderRightSide(node)}
</section>
</li>
))
}
</ul>
</div>
@ -187,7 +185,7 @@ class ContactsForm extends React.Component {
Use
</span>
<span className={styles.amount}>
<input
<input
type='text'
value={contactsform.contactCapacity}
onChange={event => updateContactCapacity(event.target.value)}
@ -211,12 +209,12 @@ class ContactsForm extends React.Component {
</ReactModal>
</div>
)
}
}
}
ContactsForm.propTypes = {
}
export default ContactsForm

16
app/components/Contacts/Donut.js

@ -7,15 +7,15 @@ const Donut = ({ value, size, strokewidth }) => {
console.log('size: ', size)
console.log('strokewidth: ', strokewidth)
const halfsize = (size * 0.5);
const radius = halfsize - (strokewidth * 0.5);
const circumference = 2 * Math.PI * radius;
const strokeval = ((value * circumference) / 100);
const dashval = (strokeval + ' ' + circumference);
const halfsize = (size * 0.5)
const radius = halfsize - (strokewidth * 0.5)
const circumference = 2 * Math.PI * radius
const strokeval = ((value * circumference) / 100)
const dashval = (`${strokeval} ${circumference}`)
const trackstyle = {strokeWidth: 5};
const indicatorstyle = {strokeWidth: strokewidth, strokeDasharray: dashval}
const rotateval = 'rotate(-90 '+37.5+','+37.5+')';
const trackstyle = { strokeWidth: 5 }
const indicatorstyle = { strokeWidth: strokewidth, strokeDasharray: dashval }
const rotateval = `rotate(-90 ${37.5},${37.5})`
return (
<svg width={75} height={75} className={styles.donutchart}>

2
app/components/Contacts/LoadingContact.js

@ -29,7 +29,7 @@ const LoadingContact = ({ pubkey, isClosing }) => (
)
LoadingContact.propTypes = {
}
export default LoadingContact

2
app/components/Contacts/OfflineContact.js

@ -27,7 +27,7 @@ const OfflineContact = ({ channel, openContactModal }) => (
)
OfflineContact.propTypes = {
}
export default OfflineContact

2
app/components/Contacts/OnlineContact.js

@ -27,7 +27,7 @@ const OnlineContact = ({ channel, openContactModal }) => (
)
OnlineContact.propTypes = {
}
export default OnlineContact

2
app/components/Contacts/PendingContact.js

@ -33,7 +33,7 @@ const PendingContact = ({ channel }) => (
)
PendingContact.propTypes = {
}
export default PendingContact

4
app/components/Form/PayForm.js

@ -9,7 +9,9 @@ import styles from './PayForm.scss'
class PayForm extends Component {
componentDidUpdate(prevProps) {
const { isOnchain, isLn, payform: { payInput }, fetchInvoice } = this.props
const {
isOnchain, isLn, payform: { payInput }, fetchInvoice
} = this.props
// If on-chain, focus on amount to let user know it's editable
if (isOnchain) { this.amountInput.focus() }

4
app/components/ModalRoot/ModalRoot.js

@ -13,7 +13,9 @@ const MODAL_COMPONENTS = {
/* other modals */
}
const ModalRoot = ({ modalType, modalProps, hideModal, currentTicker, currency }) => {
const ModalRoot = ({
modalType, modalProps, hideModal, currentTicker, currency
}) => {
if (!modalType) { return null }
const SpecificModal = MODAL_COMPONENTS[modalType]

4
app/components/ModalRoot/SuccessfulSendCoins.js

@ -5,7 +5,9 @@ import AnimatedCheckmark from 'components/AnimatedCheckmark'
import { btc } from 'utils'
import styles from './SuccessfulSendCoins.scss'
const SuccessfulSendCoins = ({ amount, addr, txid, hideModal, currentTicker, currency }) => {
const SuccessfulSendCoins = ({
amount, addr, txid, hideModal, currentTicker, currency
}) => {
const calculatedAmount = currency === 'usd' ? btc.satoshisToUsd(amount, currentTicker.price_usd) : btc.satoshisToBtc(amount)
return (

4
app/components/Network/TransactionForm.js

@ -3,7 +3,9 @@ import PropTypes from 'prop-types'
import { btc } from 'utils'
import styles from './TransactionForm.scss'
const TransactionForm = ({ updatePayReq, pay_req, loadingRoutes, payReqRoutes, setCurrentRoute, currentRoute }) => (
const TransactionForm = ({
updatePayReq, pay_req, loadingRoutes, payReqRoutes, setCurrentRoute, currentRoute
}) => (
<div className={styles.transactionForm}>
<div className={styles.form}>
<input

4
app/components/Peers/PeerModal.js

@ -6,7 +6,9 @@ import { FaClose } from 'react-icons/lib/fa'
import styles from './PeerModal.scss'
const PeerModal = ({ isOpen, resetPeer, peer, disconnect }) => {
const PeerModal = ({
isOpen, resetPeer, peer, disconnect
}) => {
const customStyles = {
overlay: {
cursor: 'pointer',

4
app/components/Wallet/ReceiveModal.js

@ -7,7 +7,9 @@ import { showNotification } from 'notifications'
import { FaCopy, FaClose } from 'react-icons/lib/fa'
import styles from './ReceiveModal.scss'
const ReceiveModal = ({ isOpen, hideActivityModal, pubkey, address, newAddress, qrCodeType, changeQrCode }) => {
const ReceiveModal = ({
isOpen, hideActivityModal, pubkey, address, newAddress, qrCodeType, changeQrCode
}) => {
const customStyles = {
overlay: {
cursor: 'pointer'

2
app/components/Wallet/Wallet.js

@ -63,7 +63,7 @@ class Wallet extends Component {
</div>
<div className={styles.right}>
<div className={styles.rightContent}>
<div className={'buttonPrimary'} onClick={() => this.setState({ modalOpen: true })}>
<div className='buttonPrimary' onClick={() => this.setState({ modalOpen: true })}>
<FaQrcode />
Address
</div>

61
app/lnd/methods/channelController.js

@ -15,7 +15,7 @@ const BufferUtil = bitcore.util.buffer
*/
export function connectAndOpen(lnd, meta, event, payload) {
console.log('payload: ', payload)
const { pubkey, host, localamt } = payload
const channelPayload = {
node_pubkey: BufferUtil.hexToBuffer(pubkey),
@ -25,38 +25,38 @@ export function connectAndOpen(lnd, meta, event, payload) {
return new Promise((resolve, reject) => {
listPeers(lnd, meta)
.then(({ peers }) => {
console.log('peers: ', peers)
const peer = find(peers, { pub_key: pubkey })
if (peer) {
console.log('already have the peer. can open the channel now')
const call = lnd.openChannel(channelPayload, meta)
call.on('data', data => event.sender.send('pushchannelupdated', { pubkey, data }))
call.on('error', error => event.sender.send('pushchannelerror', { pubkey, error: error.toString() }))
} else {
console.log('connect to the peer first')
connectPeer(lnd, meta, { pubkey, host })
.then((data) => {
console.log('connectPeer data: ', data)
.then(({ peers }) => {
console.log('peers: ', peers)
const peer = find(peers, { pub_key: pubkey })
if (peer) {
console.log('already have the peer. can open the channel now')
const call = lnd.openChannel(channelPayload, meta)
call.on('data', data => event.sender.send('pushchannelupdated', { pubkey, data }))
call.on('error', error => event.sender.send('pushchannelerror', { pubkey, error: error.toString() }))
})
.catch(err => {
console.log('connect peer err: ', err)
event.sender.send('pushchannelerror', { pubkey, error: err.toString() })
})
}
})
.catch(err => {
console.log('list peer err: ', err)
event.sender.send('pushchannelerror', { pubkey, error: err.toString() })
})
} else {
console.log('connect to the peer first')
connectPeer(lnd, meta, { pubkey, host })
.then((data) => {
console.log('connectPeer data: ', data)
const call = lnd.openChannel(channelPayload, meta)
call.on('data', data => event.sender.send('pushchannelupdated', { pubkey, data }))
call.on('error', error => event.sender.send('pushchannelerror', { pubkey, error: error.toString() }))
})
.catch((err) => {
console.log('connect peer err: ', err)
event.sender.send('pushchannelerror', { pubkey, error: err.toString() })
})
}
})
.catch((err) => {
console.log('list peer err: ', err)
event.sender.send('pushchannelerror', { pubkey, error: err.toString() })
})
})
}
@ -79,8 +79,7 @@ export function openChannel(lnd, meta, event, payload) {
return new Promise((resolve, reject) =>
pushopenchannel(lnd, meta, event, res)
.then(data => resolve(data))
.catch(error => reject(error))
)
.catch(error => reject(error)))
}

6
app/lnd/methods/index.js

@ -74,8 +74,7 @@ export default function (lnd, meta, event, msg, data) {
// [ { channels: [] }, { total_limbo_balance: 0, pending_open_channels: [], pending_closing_channels: [], pending_force_closing_channels: [] } ]
Promise.all([channelController.listChannels, channelController.pendingChannels].map(func => func(lnd, meta)))
.then(channelsData =>
event.sender.send('receiveChannels', { channels: channelsData[0].channels, pendingChannels: channelsData[1] })
)
event.sender.send('receiveChannels', { channels: channelsData[0].channels, pendingChannels: channelsData[1] }))
.catch(error => console.log('channels error: ', error))
break
case 'transactions':
@ -123,8 +122,7 @@ export default function (lnd, meta, event, msg, data) {
r_hash: new Buffer(newinvoice.r_hash, 'hex').toString('hex'),
creation_date: Date.now() / 1000
})
)
)
))
.catch((error) => {
console.log('addInvoice error: ', error)
event.sender.send('invoiceFailed', { error: error.toString() })

4
app/reducers/balance.js

@ -31,7 +31,9 @@ export const receiveBalance = (event, { walletBalance, channelBalance }) => (dis
const ACTION_HANDLERS = {
[GET_BALANCE]: state => ({ ...state, balanceLoading: true }),
[RECEIVE_BALANCE]: (state, { walletBalance, channelBalance }) => (
{ ...state, balanceLoading: false, walletBalance, channelBalance }
{
...state, balanceLoading: false, walletBalance, channelBalance
}
)
}

12
app/reducers/channels.js

@ -152,7 +152,9 @@ export const fetchChannels = () => async (dispatch) => {
export const receiveChannels = (event, { channels, pendingChannels }) => dispatch => dispatch({ type: RECEIVE_CHANNELS, channels, pendingChannels })
// Send IPC event for opening a channel
export const openChannel = ({ pubkey, host, local_amt, push_amt }) => (dispatch) => {
export const openChannel = ({
pubkey, host, local_amt, push_amt
}) => (dispatch) => {
const localamt = btc.btcToSatoshis(local_amt)
console.log('localamt: ', localamt)
@ -325,7 +327,9 @@ const ACTION_HANDLERS = {
[GET_CHANNELS]: state => ({ ...state, channelsLoading: true }),
[RECEIVE_CHANNELS]: (state, { channels, pendingChannels }) => (
{ ...state, channelsLoading: false, channels, pendingChannels }
{
...state, channelsLoading: false, channels, pendingChannels
}
),
[OPENING_CHANNEL]: state => ({ ...state, openingChannel: true }),
@ -339,13 +343,13 @@ const ACTION_HANDLERS = {
[TOGGLE_CHANNEL_PULLDOWN]: state => ({ ...state, filterPulldown: !state.filterPulldown }),
[CHANGE_CHANNEL_FILTER]: (state, { filter }) => ({ ...state, filterPulldown: false, filter }),
[ADD_LOADING_PUBKEY]: (state, { pubkey }) => ({ ...state, loadingChannelPubkeys: [pubkey, ...state.loadingChannelPubkeys] }),
[REMOVE_LOADING_PUBKEY]: (state, { pubkey }) => ({ ...state, loadingChannelPubkeys: state.loadingChannelPubkeys.filter(loadingPubkey => loadingPubkey !== pubkey) }),
[ADD_ClOSING_CHAN_ID]: (state, { chanId }) => ({ ...state, closingChannelIds: [chanId, ...state.closingChannelIds] }),
[REMOVE_ClOSING_CHAN_ID]: (state, { chanId }) => ({ ...state, closingChannelIds: state.closingChannelIds.filter(closingChanId => closingChanId !== chanId) }),
[OPEN_CONTACT_MODAL]: (state, { channel }) => ({ ...state, contactModal: { isOpen: true, channel } }),
[CLOSE_CONTACT_MODAL]: state => ({ ...state, contactModal: { isOpen: false, channel: null } })
}

2
app/reducers/invoice.js

@ -125,7 +125,7 @@ export const invoiceFailed = (event, { error }) => (dispatch) => {
dispatch(setError(error))
}
// Listen for invoice updates pushed from backend from subscribeToInvoices
// Listen for invoice updates pushed from backend from subscribeToInvoices
export const invoiceUpdate = (event, { invoice }) => (dispatch) => {
dispatch({ type: UPDATE_INVOICE, invoice })

4
app/reducers/network.js

@ -158,7 +158,9 @@ export const receiveInvoiceAndQueryRoutes = (event, { routes }) => dispatch =>
// ------------------------------------
const ACTION_HANDLERS = {
[GET_DESCRIBE_NETWORK]: state => ({ ...state, networkLoading: true }),
[RECEIVE_DESCRIBE_NETWORK]: (state, { nodes, edges }) => ({ ...state, networkLoading: false, nodes, edges }),
[RECEIVE_DESCRIBE_NETWORK]: (state, { nodes, edges }) => ({
...state, networkLoading: false, nodes, edges
}),
[GET_QUERY_ROUTES]: (state, { pubkey }) => ({ ...state, networkLoading: true, selectedNode: { pubkey, routes: [], currentRoute: {} } }),
[RECEIVE_QUERY_ROUTES]: (state, { routes }) => (

8
app/reducers/peers.js

@ -108,13 +108,17 @@ export const disconnectSuccess = (event, { pubkey }) => dispatch => dispatch({ t
const ACTION_HANDLERS = {
[DISCONNECT_PEER]: state => ({ ...state, disconnecting: true }),
[DISCONNECT_SUCCESS]: (state, { pubkey }) => (
{ ...state, disconnecting: false, peer: null, peers: state.peers.filter(peer => peer.pub_key !== pubkey) }
{
...state, disconnecting: false, peer: null, peers: state.peers.filter(peer => peer.pub_key !== pubkey)
}
),
[DISCONNECT_FAILURE]: state => ({ ...state, disconnecting: false }),
[CONNECT_PEER]: state => ({ ...state, connecting: true }),
[CONNECT_SUCCESS]: (state, { peer }) => (
{ ...state, connecting: false, peerForm: { pubkey: '', host: '', isOpen: false }, peers: [...state.peers, peer] }
{
...state, connecting: false, peerForm: { pubkey: '', host: '', isOpen: false }, peers: [...state.peers, peer]
}
),
[CONNECT_FAILURE]: state => ({ ...state, connecting: false }),

4
app/reducers/ticker.js

@ -68,7 +68,9 @@ const ACTION_HANDLERS = {
[SET_CRYPTO]: (state, { crypto }) => ({ ...state, crypto }),
[GET_TICKERS]: state => ({ ...state, tickerLoading: true }),
[RECIEVE_TICKERS]: (state, { btcTicker, ltcTicker }) => (
{ ...state, tickerLoading: false, btcTicker, ltcTicker }
{
...state, tickerLoading: false, btcTicker, ltcTicker
}
)
}

4
app/reducers/transaction.js

@ -45,7 +45,9 @@ export const fetchTransactions = () => (dispatch) => {
// Receive IPC event for payments
export const receiveTransactions = (event, { transactions }) => dispatch => dispatch({ type: RECEIVE_TRANSACTIONS, transactions })
export const sendCoins = ({ value, addr, currency, rate }) => (dispatch) => {
export const sendCoins = ({
value, addr, currency, rate
}) => (dispatch) => {
const amount = currency === 'usd' ? btc.btcToSatoshis(usd.usdToBtc(value, rate)) : btc.btcToSatoshis(value)
dispatch(sendTransaction())
ipcRenderer.send('lnd', { msg: 'sendCoins', data: { amount, addr } })

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

@ -20,7 +20,9 @@ class Activity extends Component {
}
componentWillMount() {
const { fetchPayments, fetchInvoices, fetchTransactions, fetchBalance } = this.props
const {
fetchPayments, fetchInvoices, fetchTransactions, fetchBalance
} = this.props
fetchBalance()
fetchPayments()

4
app/routes/activity/components/components/Invoice/Invoice.js

@ -6,7 +6,9 @@ import { FaBolt, FaClockO } from 'react-icons/lib/fa'
import { btc } from 'utils'
import styles from '../Activity.scss'
const Invoice = ({ invoice, ticker, currentTicker, showActivityModal }) => (
const Invoice = ({
invoice, ticker, currentTicker, showActivityModal
}) => (
<div className={styles.container} onClick={() => showActivityModal('INVOICE', { invoice })}>
{
!invoice.settled ?

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

@ -9,7 +9,9 @@ import Invoice from './Invoice'
import styles from './Modal.scss'
const Modal = ({ modalType, modalProps, hideActivityModal, ticker, currentTicker }) => {
const Modal = ({
modalType, modalProps, hideActivityModal, ticker, currentTicker
}) => {
const MODAL_COMPONENTS = {
TRANSACTION: Transaction,
PAYMENT: Payment,

4
app/routes/activity/components/components/Payment/Payment.js

@ -6,7 +6,9 @@ import { FaBolt } from 'react-icons/lib/fa'
import { btc } from 'utils'
import styles from '../Activity.scss'
const Payment = ({ payment, ticker, currentTicker, showActivityModal }) => (
const Payment = ({
payment, ticker, currentTicker, showActivityModal
}) => (
<div className={styles.container} onClick={() => showActivityModal('PAYMENT', { payment })}>
<div className={styles.date}>
<Moment format='D'>

4
app/routes/activity/components/components/Transaction/Transaction.js

@ -6,7 +6,9 @@ import { FaChain } from 'react-icons/lib/fa'
import { btc } from 'utils'
import styles from '../Activity.scss'
const Transaction = ({ transaction, ticker, currentTicker, showActivityModal }) => (
const Transaction = ({
transaction, ticker, currentTicker, showActivityModal
}) => (
<div className={styles.container} onClick={() => showActivityModal('TRANSACTION', { transaction })}>
<div className={styles.date}>
<Moment format='D'>

4
app/routes/contacts/components/Contacts.js

@ -57,7 +57,7 @@ class Contacts extends Component {
toggleFilterPulldown,
changeFilter,
nonActiveFilters,
openContactsForm,
openContactModal,
closeContactModal,
@ -163,7 +163,7 @@ class Contacts extends Component {
{
currentChannels.length > 0 && currentChannels.map((channel, index) => {
if (closingChannelIds.includes(channel.chan_id)) {
return <LoadingContact pubkey={channel.remote_pubkey} isClosing={true} />
return <LoadingContact pubkey={channel.remote_pubkey} isClosing />
} else if (Object.prototype.hasOwnProperty.call(channel, 'blocks_till_open')) {
return <PendingContact channel={channel} key={index} />
} else if (Object.prototype.hasOwnProperty.call(channel, 'closing_txid')) {

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

@ -18,7 +18,9 @@ class Network extends Component {
}
componentDidUpdate(prevProps) {
const { payReqIsLn, network: { pay_req }, fetchInvoiceAndQueryRoutes, clearQueryRoutes } = this.props
const {
payReqIsLn, network: { pay_req }, fetchInvoiceAndQueryRoutes, clearQueryRoutes
} = this.props
// If LN go retrieve invoice details
if ((prevProps.network.pay_req !== pay_req) && payReqIsLn) {
@ -31,7 +33,9 @@ class Network extends Component {
}
componentWillUnmount() {
const { clearQueryRoutes, resetPayReq, clearSelectedChannels, clearSelectedPeers } = this.props
const {
clearQueryRoutes, resetPayReq, clearSelectedChannels, clearSelectedPeers
} = this.props
clearQueryRoutes()
resetPayReq()

8
internals/scripts/CheckBuiltsExist.js

@ -9,15 +9,11 @@ function CheckBuildsExist() {
const rendererPath = path.join(__dirname, '..', '..', 'app', 'dist', 'renderer.prod.js')
if (!fs.existsSync(mainPath)) {
throw new Error(chalk.whiteBright.bgRed.bold(
'The main process is not built yet. Build it by running "npm run build-main"'
))
throw new Error(chalk.whiteBright.bgRed.bold('The main process is not built yet. Build it by running "npm run build-main"'))
}
if (!fs.existsSync(rendererPath)) {
throw new Error(chalk.whiteBright.bgRed.bold(
'The renderer process is not built yet. Build it by running "npm run build-renderer"'
))
throw new Error(chalk.whiteBright.bgRed.bold('The renderer process is not built yet. Build it by running "npm run build-renderer"'))
}
}

Loading…
Cancel
Save