-
-
-
-
-
-
- 1 ? (amount.length * 15) - 5 : 25}%`, fontSize: `${190 - (amount.length ** 2)}px` }
- }
- value={formType === 'pay' ? calculateAmount(formInvoice.amount) : amount}
- onChange={event => setAmount(event.target.value)}
- readOnly={formType === 'pay'}
- id='amount'
+ currentTicker,
+ isOnchain,
+ isLn
+}) => (
+
+
+
+
+
+
+ {
+ formType === 'pay' ?
+
+ :
+
-
- {
- formType === 'pay' ?
-
- :
-
- }
- {
- formType === 'pay' ?
-
- :
-
- }
-
+
+ }
- )
-}
+
+)
Form.propTypes = {
+ payment: PropTypes.object.isRequired,
form: PropTypes.object.isRequired,
ticker: PropTypes.object.isRequired,
setAmount: PropTypes.func.isRequired,
+ setOnchainAmount: PropTypes.func.isRequired,
setMessage: PropTypes.func.isRequired,
setPaymentRequest: PropTypes.func.isRequired,
isOpen: PropTypes.bool.isRequired,
close: PropTypes.func.isRequired,
createInvoice: PropTypes.func.isRequired,
payInvoice: PropTypes.func.isRequired,
+ sendCoins: PropTypes.func.isRequired,
fetchInvoice: PropTypes.func.isRequired,
formInvoice: PropTypes.object.isRequired,
- currentTicker: PropTypes.object.isRequired
+ currentTicker: PropTypes.object.isRequired,
+ isOnchain: PropTypes.bool.isRequired,
+ isLn: PropTypes.bool.isRequired
}
export default Form
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..a94fae17
--- /dev/null
+++ b/app/routes/app/components/components/Form/components/Pay/Pay.js
@@ -0,0 +1,146 @@
+import React, { Component } from 'react'
+import PropTypes from 'prop-types'
+import { FaBolt, FaChain } from 'react-icons/lib/fa'
+import CurrencyIcon from '../../../../../../../components/CurrencyIcon'
+import LoadingBolt from '../../../../../../../components/LoadingBolt'
+import { btc } from '../../../../../../../utils'
+import styles from './Pay.scss'
+
+class Pay extends Component {
+ componentDidUpdate(prevProps) {
+ const { isOnchain, isLn, fetchInvoice, payment_request } = this.props
+
+ if (isOnchain) { this.amountInput.focus() }
+ if ((prevProps.payment_request !== payment_request) && isLn) { fetchInvoice(payment_request) }
+ }
+
+ render() {
+ const {
+ sendingPayment,
+ invoiceAmount,
+ onchainAmount,
+ setOnchainAmount,
+ payment_request,
+ setPaymentRequest,
+ payInvoice,
+ sendCoins,
+ currentTicker,
+ currency,
+ crypto,
+ isOnchain,
+ isLn
+ } = this.props
+
+ const payClicked = () => {
+ if (!isOnchain && !isLn) { return }
+
+ if (isOnchain) { sendCoins({ value: onchainAmount, addr: payment_request, currency, rate: currentTicker.price_usd }) }
+ if (isLn) { payInvoice(payment_request) }
+ }
+
+ const calculateAmount = value => (currency === 'usd' ? btc.satoshisToUsd(value, currentTicker.price_usd) : btc.satoshisToBtc(value))
+
+ return (
+
+ {
+ sendingPayment ?
+
+ :
+ null
+
+ }
+
+
+
+
+ {(() => {
+ if (isOnchain) {
+ return (
+ {`You're about to send ${onchainAmount} ${currency.toUpperCase()} on-chain which should take around 10 minutes`}
+ )
+ } else if (isLn) {
+ return (
+ {`You're about to send ${calculateAmount(invoiceAmount)} ${currency.toUpperCase()} over the Lightning Network which will be instant`} // eslint-disable-line
+ )
+ }
+ return null
+ })()}
+
+
+
+
+
+
+
+ )
+ }
+}
+
+Pay.propTypes = {
+ sendingPayment: PropTypes.bool.isRequired,
+ invoiceAmount: PropTypes.string.isRequired,
+ onchainAmount: PropTypes.string.isRequired,
+ setOnchainAmount: PropTypes.func.isRequired,
+ payment_request: PropTypes.string.isRequired,
+ setPaymentRequest: PropTypes.func.isRequired,
+ fetchInvoice: PropTypes.func.isRequired,
+ payInvoice: PropTypes.func.isRequired,
+ sendCoins: PropTypes.func.isRequired,
+ currentTicker: PropTypes.object.isRequired,
+ currency: PropTypes.string.isRequired,
+ crypto: PropTypes.string.isRequired,
+ isOnchain: PropTypes.bool.isRequired,
+ isLn: PropTypes.bool.isRequired
+}
+
+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..90bff877
--- /dev/null
+++ b/app/routes/app/components/components/Form/components/Pay/Pay.scss
@@ -0,0 +1,142 @@
+@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;
+ min-height: 175px;
+
+ &.ln {
+ opacity: 0.75;
+ }
+
+ 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 {
+ position: relative;
+ width: 100%;
+ padding: 40px 0;
+ cursor: pointer;
+
+ .info {
+ margin-bottom: 10px;
+ min-height: 19px;
+ }
+
+ .paymentIcon {
+ position: absolute;
+ width: 20%;
+ left: calc(-12.5% - 75px);
+ top: 42px;
+ color: $main;
+ font-size: 50px;
+ text-align: center;
+
+ span {
+ text-transform: uppercase;
+ display: block;
+ font-size: 12px;
+ font-weight: 200;
+ }
+ }
+}
+
+.input {
+ display: flex;
+ justify-content: center;
+ font-size: 18px;
+ height: auto;
+ min-height: 55px;
+ 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..0b64ab7f
--- /dev/null
+++ b/app/routes/app/components/components/Form/components/Request/Request.js
@@ -0,0 +1,68 @@
+import React from 'react'
+import PropTypes from 'prop-types'
+import CurrencyIcon from '../../../../../../../components/CurrencyIcon'
+import styles from './Request.scss'
+
+const Request = ({
+ amount,
+ setAmount,
+ setMessage,
+ createInvoice,
+ message,
+ currentTicker,
+ currency,
+ crypto,
+ close
+}) => {
+ const requestClicked = () => {
+ createInvoice(amount, message, currency, currentTicker.price_usd)
+ close()
+ }
+
+ return (
+
+ )
+}
+
+Request.propTypes = {
+ amount: PropTypes.string.isRequired,
+ setAmount: PropTypes.func.isRequired,
+ setMessage: PropTypes.func.isRequired,
+ createInvoice: PropTypes.func.isRequired,
+ message: PropTypes.string.isRequired,
+ currentTicker: PropTypes.object.isRequired,
+ currency: PropTypes.string.isRequired,
+ crypto: PropTypes.string.isRequired,
+ close: PropTypes.func.isRequired
+}
+
+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/app/routes/app/components/components/ModalRoot/ModalRoot.js b/app/routes/app/components/components/ModalRoot/ModalRoot.js
new file mode 100644
index 00000000..1146c57e
--- /dev/null
+++ b/app/routes/app/components/components/ModalRoot/ModalRoot.js
@@ -0,0 +1,42 @@
+import React from 'react'
+import PropTypes from 'prop-types'
+import { MdClose } from 'react-icons/lib/md'
+import SuccessfulSendCoins from './SuccessfulSendCoins'
+import styles from './ModalRoot.scss'
+
+const MODAL_COMPONENTS = {
+ SUCCESSFUL_SEND_COINS: SuccessfulSendCoins
+ /* other modals */
+}
+
+const ModalRoot = ({ modalType, modalProps, hideModal, currentTicker, currency }) => {
+ if (!modalType) { return null }
+
+ const SpecificModal = MODAL_COMPONENTS[modalType]
+ return (
+
+ )
+}
+
+ModalRoot.propTypes = {
+ modalType: PropTypes.string,
+ modalProps: PropTypes.object.isRequired,
+ hideModal: PropTypes.func.isRequired,
+ currentTicker: PropTypes.object.isRequired,
+ currency: PropTypes.string.isRequired
+}
+
+export default ModalRoot
diff --git a/app/routes/app/components/components/ModalRoot/ModalRoot.scss b/app/routes/app/components/components/ModalRoot/ModalRoot.scss
new file mode 100644
index 00000000..b20daf3a
--- /dev/null
+++ b/app/routes/app/components/components/ModalRoot/ModalRoot.scss
@@ -0,0 +1,42 @@
+@import '../../../../../variables.scss';
+
+.container {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 10;
+ background: #fff;
+}
+
+.content {
+ position: relative;
+ height: 100vh;
+ margin: 5%;
+}
+
+.esc {
+ position: absolute;
+ top: 0;
+ right: 0;
+ color: $darkestgrey;
+ cursor: pointer;
+ padding: 20px;
+ border-radius: 50%;
+
+ &:hover {
+ color: $bluegrey;
+ background: $darkgrey;
+ }
+
+ &:active {
+ color: $white;
+ background: $main;
+ }
+
+ svg {
+ width: 32px;
+ height: 32px;
+ }
+}
\ No newline at end of file
diff --git a/app/routes/app/components/components/ModalRoot/SuccessfulSendCoins/SuccessfulSendCoins.js b/app/routes/app/components/components/ModalRoot/SuccessfulSendCoins/SuccessfulSendCoins.js
new file mode 100644
index 00000000..bdccac84
--- /dev/null
+++ b/app/routes/app/components/components/ModalRoot/SuccessfulSendCoins/SuccessfulSendCoins.js
@@ -0,0 +1,40 @@
+import { shell } from 'electron'
+import React from 'react'
+import PropTypes from 'prop-types'
+import AnimatedCheckmark from '../../../../../../components/AnimatedCheckmark'
+import { btc } from '../../../../../../utils'
+import styles from './SuccessfulSendCoins.scss'
+
+const SuccessfulSendCoins = ({ amount, addr, txid, hideModal, currentTicker, currency }) => {
+ const calculatedAmount = currency === 'usd' ? btc.satoshisToUsd(amount, currentTicker.price_usd) : btc.satoshisToBtc(amount)
+
+ return (
+
+
+
+ You
+ shell.openExternal(`https://testnet.smartbit.com.au/tx/${txid}`)}>sent
+ {calculatedAmount} {currency.toUpperCase()}
+ to
+ {addr}
+
+
+ Done
+
+
+ )
+}
+
+SuccessfulSendCoins.propTypes = {
+ amount: PropTypes.oneOfType([
+ PropTypes.number,
+ PropTypes.string
+ ]).isRequired,
+ addr: PropTypes.string.isRequired,
+ txid: PropTypes.string.isRequired,
+ hideModal: PropTypes.func.isRequired,
+ currentTicker: PropTypes.object.isRequired,
+ currency: PropTypes.string.isRequired
+}
+
+export default SuccessfulSendCoins
diff --git a/app/routes/app/components/components/ModalRoot/SuccessfulSendCoins/SuccessfulSendCoins.scss b/app/routes/app/components/components/ModalRoot/SuccessfulSendCoins/SuccessfulSendCoins.scss
new file mode 100644
index 00000000..b562cf30
--- /dev/null
+++ b/app/routes/app/components/components/ModalRoot/SuccessfulSendCoins/SuccessfulSendCoins.scss
@@ -0,0 +1,37 @@
+@import '../../../../../../variables.scss';
+
+.container {
+ position: relative;
+ min-height: 250px;
+ top: calc(50% - 250px);
+ text-align: center;
+
+ h1 {
+ font-size: 20px;
+ margin: 50px 0;
+
+ .link {
+ cursor: pointer;
+ color: $main;
+ text-decoration: underline;
+ }
+
+ .amount, .addr {
+ font-weight: bold;
+ }
+ }
+
+ .button {
+ text-align: center;
+ border-radius: 8px;
+ background: $main;
+ padding: 20px 10px;
+ font-weight: bold;
+ cursor: pointer;
+ text-transform: uppercase;
+ letter-spacing: .2px;
+ color: $white;
+ width: 15%;
+ margin: 0 auto;
+ }
+}
\ No newline at end of file
diff --git a/app/routes/app/components/components/ModalRoot/SuccessfulSendCoins/index.js b/app/routes/app/components/components/ModalRoot/SuccessfulSendCoins/index.js
new file mode 100644
index 00000000..b6c90a73
--- /dev/null
+++ b/app/routes/app/components/components/ModalRoot/SuccessfulSendCoins/index.js
@@ -0,0 +1,3 @@
+import SuccessfulSendCoins from './SuccessfulSendCoins'
+
+export default SuccessfulSendCoins
diff --git a/app/routes/app/components/components/ModalRoot/index.js b/app/routes/app/components/components/ModalRoot/index.js
new file mode 100644
index 00000000..676d19a1
--- /dev/null
+++ b/app/routes/app/components/components/ModalRoot/index.js
@@ -0,0 +1,3 @@
+import ModalRoot from './ModalRoot'
+
+export default ModalRoot
diff --git a/app/routes/app/containers/AppContainer.js b/app/routes/app/containers/AppContainer.js
index cf6de0ef..3f2e8153 100644
--- a/app/routes/app/containers/AppContainer.js
+++ b/app/routes/app/containers/AppContainer.js
@@ -4,14 +4,18 @@ import { fetchTicker, setCurrency, tickerSelectors } from '../../../reducers/tic
import { fetchBalance } from '../../../reducers/balance'
import { fetchInfo } from '../../../reducers/info'
import { createInvoice, fetchInvoice } from '../../../reducers/invoice'
-import { payInvoice } from '../../../reducers/payment'
+import { hideModal } from '../../../reducers/modal'
+import { payInvoice, sendCoins } from '../../../reducers/payment'
import { fetchChannels } from '../../../reducers/channels'
import {
setForm,
+ setPaymentType,
setAmount,
+ setOnchainAmount,
setMessage,
setPubkey,
- setPaymentRequest
+ setPaymentRequest,
+ formSelectors
} from '../../../reducers/form'
const mapDispatchToProps = {
@@ -20,12 +24,16 @@ const mapDispatchToProps = {
fetchBalance,
fetchInfo,
setAmount,
+ setOnchainAmount,
setMessage,
setPubkey,
setPaymentRequest,
setForm,
+ setPaymentType,
createInvoice,
+ hideModal,
payInvoice,
+ sendCoins,
fetchChannels,
fetchInvoice
}
@@ -36,8 +44,11 @@ const mapStateToProps = state => ({
payment: state.payment,
form: state.form,
invoice: state.invoice,
+ modal: state.modal,
- currentTicker: tickerSelectors.currentTicker(state)
+ currentTicker: tickerSelectors.currentTicker(state),
+ isOnchain: formSelectors.isOnchain(state),
+ isLn: formSelectors.isLn(state)
})
export default connect(mapStateToProps, mapDispatchToProps)(App)
diff --git a/app/variables.scss b/app/variables.scss
index a0ae306c..760ee4f8 100644
--- a/app/variables.scss
+++ b/app/variables.scss
@@ -11,4 +11,5 @@ $darkestgrey: #999999;
$bluegrey: #555459;
$green: #0bb634;
-$red: #ff0b00;
\ No newline at end of file
+$red: #ff0b00;
+$curve: cubic-bezier(0.650, 0.000, 0.450, 1.000);
\ No newline at end of file
diff --git a/package.json b/package.json
index 35846349..88ee631d 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\"",
"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": {
@@ -184,6 +185,7 @@
},
"dependencies": {
"axios": "^0.16.2",
+ "bitcoinjs-lib": "^3.1.1",
"bitcore-lib": "^0.14.0",
"devtron": "^1.4.0",
"electron-debug": "^1.2.0",
diff --git a/resources/cloudbolt.svg b/resources/cloudbolt.svg
new file mode 100644
index 00000000..c35acce3
--- /dev/null
+++ b/resources/cloudbolt.svg
@@ -0,0 +1,47 @@
+
+
+
+
diff --git a/resources/thunderstorm.svg b/resources/thunderstorm.svg
new file mode 100644
index 00000000..30c98b71
--- /dev/null
+++ b/resources/thunderstorm.svg
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/test/reducers/__snapshots__/form.spec.js.snap b/test/reducers/__snapshots__/form.spec.js.snap
index 8e69e1db..c4351236 100644
--- a/test/reducers/__snapshots__/form.spec.js.snap
+++ b/test/reducers/__snapshots__/form.spec.js.snap
@@ -6,6 +6,7 @@ Object {
"formType": "pay",
"message": "",
"modalOpen": false,
+ "onchainAmount": "0",
"payment_request": "",
"pubkey": "",
}
@@ -17,6 +18,7 @@ Object {
"formType": "pay",
"message": "",
"modalOpen": false,
+ "onchainAmount": "0",
"payment_request": "",
"pubkey": "",
}
@@ -28,6 +30,7 @@ Object {
"formType": "foo",
"message": "",
"modalOpen": true,
+ "onchainAmount": "0",
"payment_request": "",
"pubkey": "",
}
@@ -39,6 +42,7 @@ Object {
"formType": "pay",
"message": "foo",
"modalOpen": false,
+ "onchainAmount": "0",
"payment_request": "",
"pubkey": "",
}
@@ -50,6 +54,7 @@ Object {
"formType": "pay",
"message": "",
"modalOpen": false,
+ "onchainAmount": "0",
"payment_request": "foo",
"pubkey": "",
}
@@ -61,6 +66,7 @@ Object {
"formType": "pay",
"message": "",
"modalOpen": false,
+ "onchainAmount": "0",
"payment_request": "",
"pubkey": "foo",
}
@@ -72,6 +78,7 @@ Object {
"formType": "pay",
"message": "",
"modalOpen": false,
+ "onchainAmount": "0",
"payment_request": "",
"pubkey": "",
}
diff --git a/test/reducers/__snapshots__/payment.spec.js.snap b/test/reducers/__snapshots__/payment.spec.js.snap
index 135c163d..fe7667c3 100644
--- a/test/reducers/__snapshots__/payment.spec.js.snap
+++ b/test/reducers/__snapshots__/payment.spec.js.snap
@@ -5,6 +5,7 @@ Object {
"payment": null,
"paymentLoading": true,
"payments": Array [],
+ "sendingPayment": false,
}
`;
@@ -12,9 +13,8 @@ exports[`reducers paymentReducer should correctly paymentSuccessful 1`] = `
Object {
"payment": null,
"paymentLoading": false,
- "payments": Array [
- "foo",
- ],
+ "payments": Array [],
+ "sendingPayment": false,
}
`;
@@ -26,6 +26,7 @@ Object {
1,
2,
],
+ "sendingPayment": false,
}
`;
@@ -34,6 +35,7 @@ Object {
"payment": "foo",
"paymentLoading": false,
"payments": Array [],
+ "sendingPayment": false,
}
`;
@@ -42,5 +44,6 @@ Object {
"payment": null,
"paymentLoading": false,
"payments": Array [],
+ "sendingPayment": false,
}
`;
diff --git a/yarn.lock b/yarn.lock
index 733d7f3f..da74513f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1452,6 +1452,12 @@ balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+base-x@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.2.tgz#bf873861b7514279b7969f340929eab87c11d130"
+ dependencies:
+ safe-buffer "^5.0.1"
+
base64-js@1.2.0, base64-js@^1.0.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1"
@@ -1474,6 +1480,10 @@ big.js@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978"
+bigi@^1.1.0, bigi@^1.4.0:
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/bigi/-/bigi-1.4.2.tgz#9c665a95f88b8b08fc05cfd731f561859d725825"
+
binary-extensions@^1.0.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774"
@@ -1485,6 +1495,35 @@ binary-extensions@^1.0.0:
buffers "~0.1.1"
chainsaw "~0.1.0"
+bip66@^1.1.0:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22"
+ dependencies:
+ safe-buffer "^5.0.1"
+
+bitcoin-ops@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/bitcoin-ops/-/bitcoin-ops-1.3.0.tgz#6b126b585537bc679b02ed499f14450cffc37e13"
+
+bitcoinjs-lib@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/bitcoinjs-lib/-/bitcoinjs-lib-3.1.1.tgz#c2b1efe455992be88f6be70b5f6fe1a93b9abd90"
+ dependencies:
+ bigi "^1.4.0"
+ bip66 "^1.1.0"
+ bitcoin-ops "^1.3.0"
+ bs58check "^2.0.0"
+ create-hash "^1.1.0"
+ create-hmac "^1.1.3"
+ ecurve "^1.0.0"
+ merkle-lib "^2.0.10"
+ pushdata-bitcoin "^1.0.1"
+ randombytes "^2.0.1"
+ safe-buffer "^5.0.1"
+ typeforce "^1.8.7"
+ varuint-bitcoin "^1.0.4"
+ wif "^2.0.1"
+
bitcore-lib@^0.14.0:
version "0.14.0"
resolved "https://registry.yarnpkg.com/bitcore-lib/-/bitcore-lib-0.14.0.tgz#21cb2359fe7b997a3b7b773eb7d7275ae37d644e"
@@ -1657,6 +1696,19 @@ bs58@=2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/bs58/-/bs58-2.0.0.tgz#72b713bed223a0ac518bbda0e3ce3f4817f39eb5"
+bs58@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a"
+ dependencies:
+ base-x "^3.0.2"
+
+bs58check@<3.0.0, bs58check@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.0.2.tgz#06f63b01c2fa6173033c90eb87f1fe3d2e13d89a"
+ dependencies:
+ bs58 "^4.0.0"
+ create-hash "^1.1.0"
+
bser@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169"
@@ -2231,7 +2283,7 @@ create-hash@^1.1.0, create-hash@^1.1.1, create-hash@^1.1.2:
ripemd160 "^2.0.0"
sha.js "^2.4.0"
-create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
+create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.3, create-hmac@^1.1.4:
version "1.1.6"
resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06"
dependencies:
@@ -2791,6 +2843,12 @@ ecc-jsbn@~0.1.1:
dependencies:
jsbn "~0.1.0"
+ecurve@^1.0.0:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/ecurve/-/ecurve-1.0.5.tgz#d148e8fe50a674f983bb5bae09da0ea23e10535e"
+ dependencies:
+ bigi "^1.1.0"
+
editorconfig@^0.13.2:
version "0.13.2"
resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.13.2.tgz#8e57926d9ee69ab6cb999f027c2171467acceb35"
@@ -5744,6 +5802,10 @@ merge@^1.1.3:
version "1.2.0"
resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da"
+merkle-lib@^2.0.10:
+ version "2.0.10"
+ resolved "https://registry.yarnpkg.com/merkle-lib/-/merkle-lib-2.0.10.tgz#82b8dbae75e27a7785388b73f9d7725d0f6f3326"
+
methods@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
@@ -6997,6 +7059,12 @@ punycode@^1.2.4, punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
+pushdata-bitcoin@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz#15931d3cd967ade52206f523aa7331aef7d43af7"
+ dependencies:
+ bitcoin-ops "^1.3.0"
+
q@^1.1.2, q@~1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1"
@@ -8637,6 +8705,12 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
+typeforce@^1.8.7:
+ version "1.11.4"
+ resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.11.4.tgz#07ce3abcce836761243ae483dce5bc609786205c"
+ dependencies:
+ inherits "^2.0.1"
+
ua-parser-js@^0.7.9:
version "0.7.12"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.12.tgz#04c81a99bdd5dc52263ea29d24c6bf8d4818a4bb"
@@ -8849,6 +8923,10 @@ value-equal@^0.2.0:
version "0.2.1"
resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.2.1.tgz#c220a304361fce6994dbbedaa3c7e1a1b895871d"
+varuint-bitcoin@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/varuint-bitcoin/-/varuint-bitcoin-1.0.4.tgz#d812c5dae16e32f60544b6adee1d4be1307d0283"
+
vary@~1.1.0, vary@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.1.tgz#67535ebb694c1d52257457984665323f587e8d37"
@@ -9102,6 +9180,12 @@ widest-line@^1.0.0:
dependencies:
string-width "^1.0.1"
+wif@^2.0.1:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/wif/-/wif-2.0.6.tgz#08d3f52056c66679299726fade0d432ae74b4704"
+ dependencies:
+ bs58check "<3.0.0"
+
window-size@0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"