Browse Source

fix(logs): remove console.logs

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
ff3e492037
  1. 2
      app/api/index.js
  2. 9
      app/components/LndSyncing/LndSyncing.js
  3. 6
      app/components/ModalRoot/WalletDetails.js
  4. 2
      app/components/Wallet/ReceiveModal.js
  5. 1
      app/lnd/lib/lightning.js
  6. 5
      app/lnd/methods/walletController.js
  7. 2
      app/lnd/subscribe/index.js
  8. 2
      app/reducers/balance.js
  9. 4
      app/reducers/lnd.js
  10. 1
      app/reducers/transaction.js

2
app/api/index.js

@ -17,7 +17,7 @@ export function requestTickers(ids) {
export function requestBlockHeight(id) {
const BASE_URL = `https://testnet-api.smartbit.com.au/v1/blockchain/blocks?limit=1`
const BASE_URL = 'https://testnet-api.smartbit.com.au/v1/blockchain/blocks?limit=1'
return axios({
method: 'get',
url: BASE_URL

9
app/components/LndSyncing/LndSyncing.js

@ -41,8 +41,7 @@ class LndSyncing extends Component {
<h3>zap</h3>
<div className={styles.loading}>
{!fetchingBlockHeight && <h4>{syncPercentage}%</h4>}
<div className={styles.spinner}>
</div>
<div className={styles.spinner} />
<h1>syncing your lightning node to the blockchain</h1>
</div>
<div className={styles.facts}>
@ -52,15 +51,13 @@ class LndSyncing extends Component {
</div>
<ul>
{
facts.map((facts, index) => {
return (
facts.map((facts, index) => (
<li
className={`${styles.factButton} ${currentFact === index && styles.active}`}
key={index}
onClick={() => this.setState({ currentFact: index })}
/>
)
})
))
}
</ul>
</div>

6
app/components/ModalRoot/WalletDetails.js

@ -3,8 +3,7 @@ import PropTypes from 'prop-types'
import QRCode from 'qrcode.react'
import styles from './WalletDetails.scss'
const WalletDetails = ({ info, address }) => {
return (
const WalletDetails = ({ info, address }) => (
<div className={styles.walletdetails}>
<div className={styles.inner}>
<div className={styles.left}>
@ -33,8 +32,7 @@ const WalletDetails = ({ info, address }) => {
</div>
</div>
</div>
)
}
)
WalletDetails.propTypes = {
info: PropTypes.object.isRequired,

2
app/components/Wallet/ReceiveModal.js

@ -21,7 +21,7 @@ const ReceiveModal = ({ isOpen, hideActivityModal, pubkey, address }) => {
}
}
const copyOnClick = data => {
const copyOnClick = (data) => {
copy(data)
showNotification('Noice', 'Successfully copied to clipboard')
}

1
app/lnd/lib/lightning.js

@ -5,7 +5,6 @@ import config from '../config'
module.exports = (rpcpath, host) => {
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA'
console.log('RPC PATH: ', path.join(__dirname, 'rpc.proto'))
const rpc = grpc.load(path.join(__dirname, 'rpc.proto'))
const lndCert = fs.readFileSync(config.cert)

5
app/lnd/methods/walletController.js

@ -72,10 +72,7 @@ export function getTransactions(lnd) {
export function sendCoins(lnd, { addr, amount }) {
return new Promise((resolve, reject) => {
lnd.sendCoins({ addr, amount }, (err, data) => {
if (err) {
console.log('err: ', err)
reject(err)
}
if (err) { reject(err) }
resolve(data)
})

2
app/lnd/subscribe/index.js

@ -2,8 +2,6 @@ import subscribeToTransactions from './transactions'
import subscribeToInvoices from './invoices'
export default (mainWindow, lnd) => {
console.log('mainWindow: ', mainWindow)
console.log('lnd: ', lnd)
subscribeToTransactions(mainWindow, lnd)
subscribeToInvoices(mainWindow, lnd)
}

2
app/reducers/balance.js

@ -21,7 +21,7 @@ export const fetchBalance = () => async (dispatch) => {
}
// Receive IPC event for balance
export const receiveBalance = (event, { walletBalance, channelBalance }) => dispatch => {
export const receiveBalance = (event, { walletBalance, channelBalance }) => (dispatch) => {
dispatch({ type: RECEIVE_BALANCE, walletBalance, channelBalance })
}

4
app/reducers/lnd.js

@ -22,7 +22,7 @@ export const RECEIVE_BLOCK_HEIGHT = 'RECEIVE_BLOCK_HEIGHT'
export const lndSyncing = () => dispatch => dispatch({ type: START_SYNCING })
// Receive IPC event for LND stoping sync
export const lndSynced = () => dispatch => {
export const lndSynced = () => (dispatch) => {
// Fetch data now that we know LND is synced
dispatch(fetchTicker())
dispatch(fetchBalance())
@ -64,7 +64,7 @@ const ACTION_HANDLERS = {
[RECEIVE_LINE]: (state, { lndBlockHeight }) => ({ ...state, lndBlockHeight }),
[GET_BLOCK_HEIGHT]: state => ({ ...state, fetchingBlockHeight: true }),
[RECEIVE_BLOCK_HEIGHT]: (state, { blockHeight }) => ({ ...state, blockHeight, fetchingBlockHeight: false }),
[RECEIVE_BLOCK_HEIGHT]: (state, { blockHeight }) => ({ ...state, blockHeight, fetchingBlockHeight: false })
}
// ------------------------------------

1
app/reducers/transaction.js

@ -73,7 +73,6 @@ export const transactionError = () => (dispatch) => {
// Listener for when a new transaction is pushed from the subscriber
export const newTransaction = (event, { transaction }) => (dispatch) => {
console.log('transaction: ', transaction)
// Fetch new balance
dispatch(fetchBalance())

Loading…
Cancel
Save