Browse Source
Merge pull request #75 from LN-Zap/fix/bugs
Fix/bugs
renovate/lint-staged-8.x
JimmyMow
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with
67 additions and
64 deletions
-
app/components/Form/PayForm.js
-
app/components/Form/PayForm.scss
-
app/components/Form/RequestForm.js
-
app/components/Form/RequestForm.scss
-
app/components/Nav/Nav.js
-
app/containers/Root.js
-
app/reducers/address.js
-
app/routes.js
-
app/routes/app/components/App.js
-
BIN
resources/bin/darwin/lnd
|
|
@ -108,7 +108,7 @@ class PayForm extends Component { |
|
|
|
</section> |
|
|
|
</div> |
|
|
|
<section className={styles.buttonGroup}> |
|
|
|
<div className={`${styles.button} ${isValid && styles.active}`} onClick={onPaySubmit}>Pay</div> |
|
|
|
<div className={`buttonPrimary ${styles.button} ${isValid && styles.active}`} onClick={onPaySubmit}>Pay</div> |
|
|
|
</section> |
|
|
|
</div> |
|
|
|
) |
|
|
|
|
|
@ -156,21 +156,12 @@ |
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
.button { |
|
|
|
height: 55px; |
|
|
|
min-height: 55px; |
|
|
|
text-transform: none; |
|
|
|
font-size: 18px; |
|
|
|
transition: opacity .2s ease-out; |
|
|
|
background: $main; |
|
|
|
color: $white; |
|
|
|
border: none; |
|
|
|
font-weight: 500; |
|
|
|
padding: 0; |
|
|
|
width: 100%; |
|
|
|
text-align: center; |
|
|
|
line-height: 55px; |
|
|
|
opacity: 0.5; |
|
|
|
cursor: default; |
|
|
|
margin-bottom: 20px; |
|
|
|
font-weight: bold; |
|
|
|
cursor: pointer; |
|
|
|
text-transform: uppercase; |
|
|
|
letter-spacing: .2px; |
|
|
|
|
|
|
|
&:first-child { |
|
|
|
border-right: 1px solid lighten($main, 20%); |
|
|
|
|
|
@ -38,7 +38,7 @@ const RequestForm = ({ |
|
|
|
/> |
|
|
|
</section> |
|
|
|
<section className={styles.buttonGroup}> |
|
|
|
<div className={styles.button} onClick={onRequestSubmit}> |
|
|
|
<div className={`buttonPrimary ${styles.button}`} onClick={onRequestSubmit}> |
|
|
|
Request |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
|
|
@ -89,20 +89,12 @@ |
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
.button { |
|
|
|
cursor: pointer; |
|
|
|
height: 55px; |
|
|
|
min-height: 55px; |
|
|
|
text-transform: none; |
|
|
|
font-size: 18px; |
|
|
|
transition: opacity .2s ease-out; |
|
|
|
background: $main; |
|
|
|
color: $white; |
|
|
|
border: none; |
|
|
|
font-weight: 500; |
|
|
|
padding: 0; |
|
|
|
width: 100%; |
|
|
|
text-align: center; |
|
|
|
line-height: 55px; |
|
|
|
margin-bottom: 20px; |
|
|
|
font-weight: bold; |
|
|
|
cursor: pointer; |
|
|
|
text-transform: uppercase; |
|
|
|
letter-spacing: .2px; |
|
|
|
|
|
|
|
&:first-child { |
|
|
|
border-right: 1px solid lighten($main, 20%); |
|
|
|
|
|
@ -38,13 +38,6 @@ const Nav = ({ openPayForm, openRequestForm }) => ( |
|
|
|
<span>Channels</span> |
|
|
|
</li> |
|
|
|
</NavLink> |
|
|
|
<NavLink exact to='/settings' activeClassName={styles.active} className={styles.link}> |
|
|
|
<span className={styles.activeBorder} /> |
|
|
|
<li> |
|
|
|
<Isvg styles={{ verticalAlign: 'middle' }} src={settingsIcon} /> |
|
|
|
<span>Settings</span> |
|
|
|
</li> |
|
|
|
</NavLink> |
|
|
|
</ul> |
|
|
|
<div className={styles.buttons}> |
|
|
|
<div className={`buttonPrimary ${styles.button}`} onClick={openPayForm}> |
|
|
|
|
|
@ -1,20 +1,55 @@ |
|
|
|
// @flow
|
|
|
|
import React from 'react' |
|
|
|
import { Provider } from 'react-redux' |
|
|
|
import { Provider, connect } from 'react-redux' |
|
|
|
import { ConnectedRouter } from 'react-router-redux' |
|
|
|
import { fetchBlockHeight, lndSelectors } from 'reducers/lnd' |
|
|
|
import LndSyncing from 'components/LndSyncing' |
|
|
|
import Routes from '../routes' |
|
|
|
|
|
|
|
const mapDispatchToProps = { |
|
|
|
fetchBlockHeight |
|
|
|
} |
|
|
|
|
|
|
|
const mapStateToProps = state => ({ |
|
|
|
lnd: state.lnd, |
|
|
|
|
|
|
|
syncPercentage: lndSelectors.syncPercentage(state) |
|
|
|
}) |
|
|
|
|
|
|
|
type RootType = { |
|
|
|
store: {}, |
|
|
|
history: {} |
|
|
|
}; |
|
|
|
|
|
|
|
export default function Root({ store, history }: RootType) { |
|
|
|
return ( |
|
|
|
<Provider store={store}> |
|
|
|
<ConnectedRouter history={history}> |
|
|
|
<Routes /> |
|
|
|
</ConnectedRouter> |
|
|
|
</Provider> |
|
|
|
) |
|
|
|
} |
|
|
|
class Root extends React.Component { |
|
|
|
render() { |
|
|
|
const { |
|
|
|
store, |
|
|
|
history, |
|
|
|
lnd, |
|
|
|
fetchBlockHeight, |
|
|
|
syncPercentage |
|
|
|
} = this.props |
|
|
|
|
|
|
|
if (lnd.syncing) { |
|
|
|
return ( |
|
|
|
<LndSyncing |
|
|
|
fetchBlockHeight={fetchBlockHeight} |
|
|
|
fetchingBlockHeight={lnd.fetchingBlockHeight} |
|
|
|
syncPercentage={syncPercentage} |
|
|
|
/> |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
return ( |
|
|
|
<Provider store={store}> |
|
|
|
<ConnectedRouter history={history}> |
|
|
|
<Routes /> |
|
|
|
</ConnectedRouter> |
|
|
|
</Provider> |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Root) |
|
|
@ -24,11 +24,15 @@ export function getAddress() { |
|
|
|
// Send IPC event for getinfo
|
|
|
|
export const newAddress = type => async (dispatch) => { |
|
|
|
dispatch(getAddress()) |
|
|
|
console.log('getting new address type: ', addressTypes[type]) |
|
|
|
ipcRenderer.send('lnd', { msg: 'newaddress', data: { type: addressTypes[type] } }) |
|
|
|
} |
|
|
|
|
|
|
|
// Receive IPC event for info
|
|
|
|
export const receiveAddress = (event, address) => dispatch => dispatch({ type: RECEIVE_ADDRESS, address }) |
|
|
|
export const receiveAddress = (event, address) => dispatch => { |
|
|
|
console.log('address: ', address) |
|
|
|
dispatch({ type: RECEIVE_ADDRESS, address }) |
|
|
|
} |
|
|
|
|
|
|
|
// ------------------------------------
|
|
|
|
// Action Handlers
|
|
|
|
|
|
@ -14,4 +14,4 @@ export default () => ( |
|
|
|
<Route path='/' component={Activity} /> |
|
|
|
</Switch> |
|
|
|
</App> |
|
|
|
); |
|
|
|
) |
|
|
|
|
|
@ -13,12 +13,10 @@ class App extends Component { |
|
|
|
componentWillMount() { |
|
|
|
const { fetchTicker, fetchBalance, fetchInfo, newAddress, lnd: { syncing } } = this.props |
|
|
|
|
|
|
|
if (!syncing) { |
|
|
|
fetchTicker() |
|
|
|
fetchBalance() |
|
|
|
fetchInfo() |
|
|
|
newAddress('p2pkh') |
|
|
|
} |
|
|
|
fetchTicker() |
|
|
|
fetchBalance() |
|
|
|
fetchInfo() |
|
|
|
newAddress('p2pkh') |
|
|
|
} |
|
|
|
|
|
|
|
render() { |
|
|
@ -47,16 +45,6 @@ class App extends Component { |
|
|
|
children |
|
|
|
} = this.props |
|
|
|
|
|
|
|
if (lnd.syncing) { |
|
|
|
return ( |
|
|
|
<LndSyncing |
|
|
|
fetchBlockHeight={fetchBlockHeight} |
|
|
|
fetchingBlockHeight={lnd.fetchingBlockHeight} |
|
|
|
syncPercentage={syncPercentage} |
|
|
|
/> |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
if (!currentTicker || balance.balanceLoading) { return <LoadingBolt /> } |
|
|
|
|
|
|
|
return ( |
|
|
|