From e61c8cb38ca67ed9329a60503726c081e64c6553 Mon Sep 17 00:00:00 2001 From: Jack Mallers Date: Thu, 14 Sep 2017 16:52:01 -0500 Subject: [PATCH] fix(sendcoins): close form modal on callback for successful sendcoins, not on submit of sendcoins --- app/reducers/payment.js | 2 ++ app/routes/app/components/components/Form/components/Pay/Pay.js | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/reducers/payment.js b/app/reducers/payment.js index a8b94c2f..431dbd29 100644 --- a/app/reducers/payment.js +++ b/app/reducers/payment.js @@ -1,6 +1,7 @@ import { createSelector } from 'reselect' import { ipcRenderer } from 'electron' import { btc, usd } from '../utils' +import { setForm } from './form' // ------------------------------------ // Constants @@ -78,6 +79,7 @@ export const sendSuccessful = (event, { amount, addr, txid }) => dispatch => { console.log('amount: ', amount) console.log('addr: ', addr) console.log('txid: ', txid) + dispatch(setForm({ modalOpen: false })) // TODO: Add successful on-chain payment to payments list once payments list supports on-chain and LN // dispatch({ type: PAYMENT_SUCCESSFULL, payment: { amount, addr, txid, pending: true } }) } diff --git a/app/routes/app/components/components/Form/components/Pay/Pay.js b/app/routes/app/components/components/Form/components/Pay/Pay.js index a19a701c..a57c1dcc 100644 --- a/app/routes/app/components/components/Form/components/Pay/Pay.js +++ b/app/routes/app/components/components/Form/components/Pay/Pay.js @@ -38,7 +38,6 @@ class Pay extends Component { if (isOnchain) { sendCoins({ value: onchainAmount, addr: payment_request, currency, crypto, rate: currentTicker.price_usd }) } if (isLn) { payInvoice(payment_request) } - close() } const calculateAmount = value => (currency === 'usd' ? btc.satoshisToUsd(value, currentTicker.price_usd) : btc.satoshisToBtc(value))