From 15b5caa2afebcbac0a6cf165ca731cbd1b3dfe1f Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Tue, 21 Aug 2018 13:08:13 +0200 Subject: [PATCH] fix(wallet): fetch channels after new transaction Make a call to fetch the updated channels whenever a new transaction is detected. Fix #579 Fix #580 --- app/reducers/transaction.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/reducers/transaction.js b/app/reducers/transaction.js index aed218e3..4f587e92 100644 --- a/app/reducers/transaction.js +++ b/app/reducers/transaction.js @@ -6,6 +6,7 @@ import { fetchBalance } from './balance' import { setFormType } from './form' import { resetPayForm } from './payform' import { setError } from './error' +import { fetchChannels } from './channels' // ------------------------------------ // Constants @@ -129,13 +130,15 @@ export const newTransaction = (event, { transaction }) => (dispatch, getState) = !state.transaction.transactions || !state.transaction.transactions.find(tx => tx.tx_hash === transaction.tx_hash) ) { - // Fetch new balance - dispatch(fetchBalance()) - decorateTransaction(transaction) dispatch({ type: ADD_TRANSACTION, transaction }) + // fetch updated channels + dispatch(fetchChannels()) + // fetch new balance + dispatch(fetchBalance()) + // HTML 5 desktop notification for the new transaction if (transaction.received) { showNotification(