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. 4
      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) { 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({ return axios({
method: 'get', method: 'get',
url: BASE_URL url: BASE_URL

9
app/components/LndSyncing/LndSyncing.js

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

4
app/components/ModalRoot/WalletDetails.js

@ -3,8 +3,7 @@ import PropTypes from 'prop-types'
import QRCode from 'qrcode.react' import QRCode from 'qrcode.react'
import styles from './WalletDetails.scss' import styles from './WalletDetails.scss'
const WalletDetails = ({ info, address }) => { const WalletDetails = ({ info, address }) => (
return (
<div className={styles.walletdetails}> <div className={styles.walletdetails}>
<div className={styles.inner}> <div className={styles.inner}>
<div className={styles.left}> <div className={styles.left}>
@ -34,7 +33,6 @@ const WalletDetails = ({ info, address }) => {
</div> </div>
</div> </div>
) )
}
WalletDetails.propTypes = { WalletDetails.propTypes = {
info: PropTypes.object.isRequired, 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) copy(data)
showNotification('Noice', 'Successfully copied to clipboard') showNotification('Noice', 'Successfully copied to clipboard')
} }

1
app/lnd/lib/lightning.js

@ -5,7 +5,6 @@ import config from '../config'
module.exports = (rpcpath, host) => { module.exports = (rpcpath, host) => {
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA' 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 rpc = grpc.load(path.join(__dirname, 'rpc.proto'))
const lndCert = fs.readFileSync(config.cert) 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 }) { export function sendCoins(lnd, { addr, amount }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
lnd.sendCoins({ addr, amount }, (err, data) => { lnd.sendCoins({ addr, amount }, (err, data) => {
if (err) { if (err) { reject(err) }
console.log('err: ', err)
reject(err)
}
resolve(data) resolve(data)
}) })

2
app/lnd/subscribe/index.js

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

2
app/reducers/balance.js

@ -21,7 +21,7 @@ export const fetchBalance = () => async (dispatch) => {
} }
// Receive IPC event for balance // 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 }) 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 }) export const lndSyncing = () => dispatch => dispatch({ type: START_SYNCING })
// Receive IPC event for LND stoping sync // Receive IPC event for LND stoping sync
export const lndSynced = () => dispatch => { export const lndSynced = () => (dispatch) => {
// Fetch data now that we know LND is synced // Fetch data now that we know LND is synced
dispatch(fetchTicker()) dispatch(fetchTicker())
dispatch(fetchBalance()) dispatch(fetchBalance())
@ -64,7 +64,7 @@ const ACTION_HANDLERS = {
[RECEIVE_LINE]: (state, { lndBlockHeight }) => ({ ...state, lndBlockHeight }), [RECEIVE_LINE]: (state, { lndBlockHeight }) => ({ ...state, lndBlockHeight }),
[GET_BLOCK_HEIGHT]: state => ({ ...state, fetchingBlockHeight: true }), [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 // Listener for when a new transaction is pushed from the subscriber
export const newTransaction = (event, { transaction }) => (dispatch) => { export const newTransaction = (event, { transaction }) => (dispatch) => {
console.log('transaction: ', transaction)
// Fetch new balance // Fetch new balance
dispatch(fetchBalance()) dispatch(fetchBalance())

Loading…
Cancel
Save