-
-
{paymentItem.creation_date * 1000}
+ (
+
setPayment(paymentItem)}>
+
-
-
-
- {
- ticker.currency === 'usd' ?
- btc.satoshisToUsd(paymentItem.fee, currentTicker.price_usd)
- :
- btc.satoshisToBtc(paymentItem.fee)
- }
-
-
-
-
- {
- ticker.currency === 'usd' ?
- btc.satoshisToUsd(paymentItem.value, currentTicker.price_usd)
- :
- btc.satoshisToBtc(paymentItem.value)
- }
-
-
- )
+
+
+ {paymentItem.creation_date * 1000}
+
+
+
+
+ {
+ ticker.currency === 'usd' ?
+ btc.satoshisToUsd(paymentItem.fee, currentTicker.price_usd)
+ :
+ btc.satoshisToBtc(paymentItem.fee)
+ }
+
+
+
+
+ {
+ ticker.currency === 'usd' ?
+ btc.satoshisToUsd(paymentItem.value, currentTicker.price_usd)
+ :
+ btc.satoshisToBtc(paymentItem.value)
+ }
+
+
+
+ )
)
}
diff --git a/app/routes/app/components/components/Form/Form.js b/app/routes/app/components/components/Form/Form.js
index 38c3c963..35177fa8 100644
--- a/app/routes/app/components/components/Form/Form.js
+++ b/app/routes/app/components/components/Form/Form.js
@@ -1,6 +1,8 @@
import React from 'react'
import PropTypes from 'prop-types'
import { MdClose } from 'react-icons/lib/md'
+import Pay from './components/Pay'
+import Request from './components/Request'
import CurrencyIcon from '../../../../../components/CurrencyIcon'
import { btc } from '../../../../../utils'
import styles from './Form.scss'
@@ -19,23 +21,6 @@ const Form = ({
formInvoice,
currentTicker
}) => {
- const requestClicked = () => {
- createInvoice(amount, message, currency, currentTicker.price_usd)
- close()
- }
-
- const payClicked = () => {
- payInvoice(payment_request)
- close()
- }
-
- const paymentRequestOnChange = (payreq) => {
- setPaymentRequest(payreq)
- if (payreq.length === 124) { fetchInvoice(payreq) }
- }
-
- const calculateAmount = value => (currency === 'usd' ? btc.satoshisToUsd(value, currentTicker.price_usd) : btc.satoshisToBtc(value))
-
return (
@@ -43,62 +28,32 @@ const Form = ({
-
- {
- formType === 'pay' ?
-
- :
-
- }
{
formType === 'pay' ?
-
+
:
-
+
+
}
diff --git a/app/routes/app/components/components/Form/Form.scss b/app/routes/app/components/components/Form/Form.scss
index 282d0686..191f89a8 100644
--- a/app/routes/app/components/components/Form/Form.scss
+++ b/app/routes/app/components/components/Form/Form.scss
@@ -128,67 +128,6 @@
}
}
- .peersContainer {
- width: 100%;
- margin: 10px 0 50px 0;
-
- h4 {
- text-transform: uppercase;
- color: $black;
- letter-spacing: 2;
- font-weight: bold;
- margin-bottom: 20px;
- padding: 10px 0;
- }
-
- .peers {
- overflow-y: scroll;
- width: 100%;
- }
-
- .peer {
- position: relative;
- width: 100%;
- border-top: 1px solid $traditionalgrey;
- border-right: 1px solid transparent;
- border-bottom: 1px solid transparent;
- border-left: 1px solid transparent;
- padding: 5px;
- cursor: pointer;
- transition: all 0.25s;
-
- &:hover {
- background: lighten($main, 20%);
- border-radius: 6px;
- border: 1px solid $main;
-
- svg {
- visibility: visible;
- }
- }
-
- p {
- margin: 3px 0;
- }
-
- .address {
- font-size: 18px;
- }
-
- .pubkey {
- font-size: 12px;
- }
-
- svg {
- visibility: hidden;
- position: absolute;
- top: calc(50% - 8px);
- right: 5%;
- color: $black;
- }
- }
- }
-
.buttonGroup {
width: 100%;
display: flex;
diff --git a/app/routes/app/components/components/Form/components/Pay/Pay.js b/app/routes/app/components/components/Form/components/Pay/Pay.js
new file mode 100644
index 00000000..92a845a2
--- /dev/null
+++ b/app/routes/app/components/components/Form/components/Pay/Pay.js
@@ -0,0 +1,67 @@
+import React from 'react'
+import PropTypes from 'prop-types'
+import CurrencyIcon from '../../../../../../../components/CurrencyIcon'
+import { btc } from '../../../../../../../utils'
+import styles from './Pay.scss'
+
+const Pay = ({
+ amount,
+ payment_request,
+ setPaymentRequest,
+ fetchInvoice,
+ payInvoice,
+ currency,
+ crypto,
+ close
+}) => {
+ const payClicked = () => {
+ if (payment_request.length !== 124) { return }
+
+ payInvoice(payment_request)
+ close()
+ }
+
+ const paymentRequestOnChange = payreq => {
+ setPaymentRequest(payreq)
+ if (payreq.length === 124) { fetchInvoice(payreq) }
+ }
+
+ const calculateAmount = value => (currency === 'usd' ? btc.satoshisToUsd(value, currentTicker.price_usd) : btc.satoshisToBtc(value))
+
+ return (
+
+ )
+}
+
+Pay.propTypes = {}
+
+export default Pay
diff --git a/app/routes/app/components/components/Form/components/Pay/Pay.scss b/app/routes/app/components/components/Form/components/Pay/Pay.scss
new file mode 100644
index 00000000..7a18ac05
--- /dev/null
+++ b/app/routes/app/components/components/Form/components/Pay/Pay.scss
@@ -0,0 +1,110 @@
+@import '../../../../../../../variables.scss';
+
+.container {
+ margin: 0 auto;
+ display: flex;
+ flex-direction: column;
+ height: 75vh;
+ justify-content: center;
+ align-items: center;
+}
+
+.amountContainer {
+ color: $main;
+ display: flex;
+ justify-content: center;
+ min-height: 120px;
+ margin-bottom: 20px;
+
+ label, input[type=text] {
+ color: inherit;
+ display: inline-block;
+ vertical-align: top;
+ padding: 0;
+ }
+
+ label {
+ svg {
+ width: 85px;
+ height: 85px;
+ }
+
+ svg[data-icon='ltc'] {
+ margin-right: 10px;
+
+ g {
+ transform: scale(1.75) translate(-5px, -5px);
+ }
+ }
+ }
+
+ input[type=text] {
+ width: 100px;
+ font-size: 180px;
+ border: none;
+ outline: 0;
+ -webkit-appearance: none;
+ }
+}
+
+.inputContainer {
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ font-size: 18px;
+ height: auto;
+ min-height: 55px;
+ margin-bottom: 20px;
+ border: 1px solid $traditionalgrey;
+ border-radius: 6px;
+ position: relative;
+ padding: 0 20px;
+
+ label, input[type=text] {
+ font-size: inherit;
+ }
+
+ label {
+ padding-top: 19px;
+ padding-bottom: 12px;
+ color: $traditionalgrey;
+ }
+
+ input[type=text] {
+ width: 100%;
+ border: none;
+ outline: 0;
+ -webkit-appearance: none;
+ height: 55px;
+ padding: 0 10px;
+ }
+}
+
+.buttonGroup {
+ width: 100%;
+ display: flex;
+ flex-direction: row;
+ border-radius: 6px;
+ 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;
+
+ &:first-child {
+ border-right: 1px solid lighten($main, 20%);
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/routes/app/components/components/Form/components/Pay/index.js b/app/routes/app/components/components/Form/components/Pay/index.js
new file mode 100644
index 00000000..89680350
--- /dev/null
+++ b/app/routes/app/components/components/Form/components/Pay/index.js
@@ -0,0 +1,3 @@
+import Pay from './Pay'
+
+export default Pay
diff --git a/app/routes/app/components/components/Form/components/Request/Request.js b/app/routes/app/components/components/Form/components/Request/Request.js
new file mode 100644
index 00000000..1d83faeb
--- /dev/null
+++ b/app/routes/app/components/components/Form/components/Request/Request.js
@@ -0,0 +1,59 @@
+import React from 'react'
+import PropTypes from 'prop-types'
+import CurrencyIcon from '../../../../../../../components/CurrencyIcon'
+import styles from './Request.scss'
+
+const Request = ({
+ amount,
+ setAmount,
+ payment_request,
+ setMessage,
+ createInvoice,
+ message,
+ currentTicker,
+ currency,
+ crypto,
+ close
+}) => {
+ const requestClicked = () => {
+ createInvoice(amount, message, currency, currentTicker.price_usd)
+ close()
+ }
+
+ return (
+
+ )
+}
+
+Request.propTypes = {}
+
+export default Request
diff --git a/app/routes/app/components/components/Form/components/Request/Request.scss b/app/routes/app/components/components/Form/components/Request/Request.scss
new file mode 100644
index 00000000..7a18ac05
--- /dev/null
+++ b/app/routes/app/components/components/Form/components/Request/Request.scss
@@ -0,0 +1,110 @@
+@import '../../../../../../../variables.scss';
+
+.container {
+ margin: 0 auto;
+ display: flex;
+ flex-direction: column;
+ height: 75vh;
+ justify-content: center;
+ align-items: center;
+}
+
+.amountContainer {
+ color: $main;
+ display: flex;
+ justify-content: center;
+ min-height: 120px;
+ margin-bottom: 20px;
+
+ label, input[type=text] {
+ color: inherit;
+ display: inline-block;
+ vertical-align: top;
+ padding: 0;
+ }
+
+ label {
+ svg {
+ width: 85px;
+ height: 85px;
+ }
+
+ svg[data-icon='ltc'] {
+ margin-right: 10px;
+
+ g {
+ transform: scale(1.75) translate(-5px, -5px);
+ }
+ }
+ }
+
+ input[type=text] {
+ width: 100px;
+ font-size: 180px;
+ border: none;
+ outline: 0;
+ -webkit-appearance: none;
+ }
+}
+
+.inputContainer {
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ font-size: 18px;
+ height: auto;
+ min-height: 55px;
+ margin-bottom: 20px;
+ border: 1px solid $traditionalgrey;
+ border-radius: 6px;
+ position: relative;
+ padding: 0 20px;
+
+ label, input[type=text] {
+ font-size: inherit;
+ }
+
+ label {
+ padding-top: 19px;
+ padding-bottom: 12px;
+ color: $traditionalgrey;
+ }
+
+ input[type=text] {
+ width: 100%;
+ border: none;
+ outline: 0;
+ -webkit-appearance: none;
+ height: 55px;
+ padding: 0 10px;
+ }
+}
+
+.buttonGroup {
+ width: 100%;
+ display: flex;
+ flex-direction: row;
+ border-radius: 6px;
+ 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;
+
+ &:first-child {
+ border-right: 1px solid lighten($main, 20%);
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/routes/app/components/components/Form/components/Request/index.js b/app/routes/app/components/components/Form/components/Request/index.js
new file mode 100644
index 00000000..29b01605
--- /dev/null
+++ b/app/routes/app/components/components/Form/components/Request/index.js
@@ -0,0 +1,3 @@
+import Request from './Request'
+
+export default Request
diff --git a/graph.svg b/graph.svg
new file mode 100644
index 00000000..36b1f680
--- /dev/null
+++ b/graph.svg
@@ -0,0 +1,673 @@
+
+
+
+
+
diff --git a/package.json b/package.json
index 35846349..4158f953 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
"build-dll": "cross-env NODE_ENV=development node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.dev.dll.js --colors",
"build-main": "cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.main.prod.js --colors",
"build-renderer": "cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.prod.js --colors",
- "dev": "cross-env START_HOT=1 npm run start-renderer-dev",
+ "dev": "cross-env START_HOT=1 concurrently \"npm run start-renderer-dev\" \"npm run lnd\"",
"flow": "flow",
"flow-typed": "rimraf flow-typed/npm && flow-typed install --overwrite || true",
"lint": "eslint --cache --format=node_modules/eslint-formatter-pretty .",
@@ -27,7 +27,8 @@
"test": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 node --trace-warnings ./test/runTests.js",
"test-all": "npm run lint && npm run flow && npm run build && npm run test && npm run test-e2e",
"test-e2e": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 node --trace-warnings ./test/runTests.js e2e",
- "test-watch": "npm test -- --watch"
+ "test-watch": "npm test -- --watch",
+ "lnd": "lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug --neutrino.active --neutrino.connect=faucet.lightning.community:18333 --no-macaroons"
},
"browserslist": "electron 1.6",
"build": {