diff --git a/app/components/Network/PeersList.js b/app/components/Network/PeersList.js
deleted file mode 100644
index f9f57771..00000000
--- a/app/components/Network/PeersList.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import React from 'react'
-import PropTypes from 'prop-types'
-import styles from './PeersList.scss'
-
-const PeersList = ({ peers }) => (
-
- {
- peers.map(peer =>
- -
-
{peer.address}
- {peer.pub_key}
-
- )
- }
-
-)
-
-PeersList.propTypes = {
- peers: PropTypes.array.isRequired
-}
-
-export default PeersList
diff --git a/app/components/Network/PeersList.scss b/app/components/Network/PeersList.scss
deleted file mode 100644
index cda8f8d3..00000000
--- a/app/components/Network/PeersList.scss
+++ /dev/null
@@ -1,18 +0,0 @@
-@import '../../variables.scss';
-
-.peer {
- margin: 20px 0;
- cursor: pointer;
-
- &:hover {
- opacity: 0.5;
- }
-
- h1 {
- margin-bottom: 5px;
- }
-
- h4 {
- font-size: 10px;
- }
-}
\ No newline at end of file
diff --git a/app/components/Network/TransactionForm.js b/app/components/Network/TransactionForm.js
deleted file mode 100644
index 1c9a7599..00000000
--- a/app/components/Network/TransactionForm.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import React from 'react'
-import PropTypes from 'prop-types'
-import styles from './TransactionForm.scss'
-
-const TransactionForm = ({}) => (
-
-)
-
-TransactionForm.propTypes = {
-
-}
-
-export default TransactionForm
diff --git a/app/components/Network/TransactionForm.scss b/app/components/Network/TransactionForm.scss
deleted file mode 100644
index ab9c43a0..00000000
--- a/app/components/Network/TransactionForm.scss
+++ /dev/null
@@ -1,28 +0,0 @@
-@import '../../variables.scss';
-
-.input {
- width: 100%;
- background: $secondary;
- color: $terminalgreen;
- -webkit-appearance: none;
- border: none;
- border-bottom: 1px solid $terminalgreen;
- padding: 5px;
- outline: 0;
-}
-
-.submitContainer {
- margin-top: 20px;
- text-align: right;
-}
-
-.submit {
- padding: 5px;
- color: $terminalgreen;
- cursor: pointer;
-
- &:hover {
- background: $terminalgreen;
- color: $secondary;
- }
-}
\ No newline at end of file
diff --git a/app/reducers/network.js b/app/reducers/network.js
index aad9a9c7..28dfedaf 100644
--- a/app/reducers/network.js
+++ b/app/reducers/network.js
@@ -18,6 +18,8 @@ export const SET_CURRENT_TAB = 'SET_CURRENT_TAB'
export const SET_CURRENT_PEER = 'SET_CURRENT_PEER'
+export const UPDATE_PAY_REQ = 'UPDATE_PAY_REQ'
+
// ------------------------------------
// Actions
// ------------------------------------
@@ -62,6 +64,13 @@ export function setCurrentPeer(currentPeer) {
}
}
+export function updatePayReq(pay_req) {
+ return {
+ type: UPDATE_PAY_REQ,
+ pay_req
+ }
+}
+
// Send IPC event for describeNetwork
export const fetchDescribeNetwork = () => (dispatch) => {
dispatch(getDescribeNetwork())
@@ -105,7 +114,9 @@ const ACTION_HANDLERS = {
[SET_CURRENT_TAB]: (state, { currentTab }) => ({ ...state, currentTab }),
- [SET_CURRENT_PEER]: (state, { currentPeer }) => ({ ...state, currentPeer })
+ [SET_CURRENT_PEER]: (state, { currentPeer }) => ({ ...state, currentPeer }),
+
+ [UPDATE_PAY_REQ]: (state, { pay_req }) => ({ ...state, pay_req })
}
// ------------------------------------
@@ -141,7 +152,9 @@ const initialState = {
currentTab: 1,
- currentPeer: {}
+ currentPeer: {},
+
+ pay_req: ''
}
diff --git a/app/routes.js b/app/routes.js
index c0bfe51b..b97b8172 100644
--- a/app/routes.js
+++ b/app/routes.js
@@ -5,14 +5,12 @@ import App from './routes/app'
import Activity from './routes/activity'
import Peers from './routes/peers'
import Channels from './routes/channels'
-import Network from './routes/network'
export default () => (
-
diff --git a/app/routes/network/components/Network.js b/app/routes/network/components/Network.js
deleted file mode 100644
index 4a97a021..00000000
--- a/app/routes/network/components/Network.js
+++ /dev/null
@@ -1,125 +0,0 @@
-import React, { Component } from 'react'
-import PropTypes from 'prop-types'
-
-import { InteractiveForceGraph, ForceGraphNode, ForceGraphLink } from 'react-vis-force'
-import LoadingBolt from 'components/LoadingBolt'
-import PeersList from 'components/Network/PeersList'
-import TransactionForm from 'components/Network/TransactionForm'
-
-import styles from './Network.scss'
-
-class Network extends Component {
- componentWillMount() {
- const { fetchDescribeNetwork, fetchPeers, fetchChannels } = this.props
-
- fetchDescribeNetwork()
- fetchPeers()
- fetchChannels()
- }
-
- render() {
- const {
- setCurrentTab,
-
- network: { nodes, edges, selectedNode, networkLoading, currentTab },
- peers: { peers },
- channels,
- identity_pubkey
- } = this.props
-
- console.log('props: ', this.props)
-
- if (networkLoading) return
-
- const renderTab = () => {
- switch(currentTab) {
- case 1:
- return
- break
- case 2:
- return
channels
- break
- case 3:
- return
- break
- }
- }
-
- return (
-
-
- console.log('node: ', node)}
- opacityFactor={1}
- zoomOptions={{ minScale: 0.1, maxScale: 5 }}
- zoom
- highlightDependencies
- >
-
- {
- nodes.map(node => {
- return (
-
- )
- })
- }
- {
- edges.map(edge => {
- return (
- this[edge.channel_id] = line}
- />
- )
- })
- }
-
-
-
-
- - setCurrentTab(1)}>
-
Peers
-
- - setCurrentTab(2)}>
-
Channels
-
- - setCurrentTab(3)}>
-
Transaction
-
-
-
-
- {renderTab()}
-
-
-
- )
- }
-}
-
-Network.propTypes = {}
-
-export default Network
diff --git a/app/routes/network/components/Network.scss b/app/routes/network/components/Network.scss
deleted file mode 100644
index 76591dc4..00000000
--- a/app/routes/network/components/Network.scss
+++ /dev/null
@@ -1,83 +0,0 @@
-@import '../../../variables.scss';
-
-@keyframes dash {
- to {
- stroke-dashoffset: 1000;
- }
-}
-
-@keyframes fadein {
- 0% { background: $white; }
- 50% { background: lighten($secondary, 50%); }
- 100% { background: $secondary; animation-fill-mode:forwards; }
-}
-
-.container {
- width: 100%;
- height: 100vh;
- animation: fadein 0.5s;
- animation-timing-function:linear;
- animation-fill-mode:forwards;
- animation-iteration-count: 1;
-
- line.active {
- opacity: 1;
- stroke: green;
- stroke-width: 5;
- stroke-dasharray: 100;
- animation: dash 2.5s infinite linear;
- }
-
- circle {
- cursor: pointer;
- }
-}
-
-.network, .data {
- display: inline-block;
- vertical-align: top;
- height: 100vh;
-}
-
-.network {
- width: 70%;
-}
-
-.data {
- width: calc(30% - 1px);
- color: #00FF00;
- word-wrap: break-word;
- overflow-y: scroll;
- border-left: 1px solid $darkgrey;
- font-family: 'Courier New';
-
- .tabs {
- margin-top: 20px;
- padding: 0 20px;
- display: flex;
- flex-direction: row;
-
- .tab {
- padding: 10px;
- cursor: pointer;
- transition: all 0.25s;
-
- &:hover {
- background: #00FF00;
- color: $black;
- opacity: 0.5;
- }
-
- &.active {
- background: #00FF00;
- color: $black;
- }
- }
-
- }
-
- .currentTab {
- margin-top: 20px;
- padding: 20px;
- }
-}
diff --git a/app/routes/network/containers/NetworkContainer.js b/app/routes/network/containers/NetworkContainer.js
deleted file mode 100644
index 873d0998..00000000
--- a/app/routes/network/containers/NetworkContainer.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { withRouter } from 'react-router'
-import { connect } from 'react-redux'
-
-import { fetchDescribeNetwork, setCurrentTab } from 'reducers/network'
-import { fetchPeers } from 'reducers/peers'
-import { fetchChannels } from 'reducers/channels'
-
-import Network from '../components/Network'
-
-const mapDispatchToProps = {
- setCurrentTab,
- fetchDescribeNetwork,
- fetchPeers,
- fetchChannels
-}
-
-const mapStateToProps = state => ({
- network: state.network,
- peers: state.peers,
- channels: state.channels,
- identity_pubkey: state.info.data.identity_pubkey
-})
-
-export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Network))
diff --git a/app/routes/network/index.js b/app/routes/network/index.js
deleted file mode 100644
index 36983a87..00000000
--- a/app/routes/network/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import NetworkContainer from './containers/NetworkContainer'
-
-export default NetworkContainer