formClicked('pay')}>
+
showModal('PAY_FORM', payFormProps)}>
Pay
formClicked('request')}>
diff --git a/app/routes/app/containers/AppContainer.js b/app/routes/app/containers/AppContainer.js
index 2559755b..db4ea28d 100644
--- a/app/routes/app/containers/AppContainer.js
+++ b/app/routes/app/containers/AppContainer.js
@@ -3,7 +3,7 @@ import { fetchTicker, setCurrency, tickerSelectors } from 'reducers/ticker'
import { fetchBalance } from 'reducers/balance'
import { fetchInfo } from 'reducers/info'
import { createInvoice, fetchInvoice } from 'reducers/invoice'
-import { hideModal } from 'reducers/modal'
+import { showModal, hideModal } from 'reducers/modal'
import { payInvoice } from 'reducers/payment'
import { sendCoins } from 'reducers/transaction'
import { fetchChannels } from 'reducers/channels'
@@ -17,6 +17,10 @@ import {
setPaymentRequest,
formSelectors
} from 'reducers/form'
+
+import { setPayAmount, setPayInput } from 'reducers/payform'
+
+
import App from '../components/App'
const mapDispatchToProps = {
@@ -36,7 +40,8 @@ const mapDispatchToProps = {
payInvoice,
sendCoins,
fetchChannels,
- fetchInvoice
+ fetchInvoice,
+ showModal
}
const mapStateToProps = state => ({
@@ -44,13 +49,31 @@ const mapStateToProps = state => ({
balance: state.balance,
payment: state.payment,
transaction: state.transaction,
+
form: state.form,
+
invoice: state.invoice,
modal: state.modal,
currentTicker: tickerSelectors.currentTicker(state),
isOnchain: formSelectors.isOnchain(state),
- isLn: formSelectors.isLn(state)
+ isLn: formSelectors.isLn(state),
+
+ // Props to pass to the payment form modal
+ payFormProps: {
+ setPayAmount,
+ setPayInput,
+ onPaySubmit: () => {
+ const isOnchain = formSelectors.isOnchain(state)
+ const isLn = formSelectors.isLn(state)
+
+ console.log('isOnchain: ', isOnchain)
+ console.log('isLn: ', isLn)
+
+ console.log('amount: ', state.payform.amount)
+ console.log('inputField: ', state.payform.inputField)
+ }
+ }
})
export default connect(mapStateToProps, mapDispatchToProps)(App)