Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #998 from mrfelton/fix/fetch-chanel-balance
Browse files Browse the repository at this point in the history
fix(channels): fetch balance on receiving channels
  • Loading branch information
JimmyMow committed Dec 3, 2018
2 parents cbe838c + 3006ae4 commit 60cb0b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/reducers/channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { btc } from 'lib/utils'
import { requestSuggestedNodes } from 'lib/utils/api'
import db from 'store/db'
import { setError } from './error'
import { fetchBalance } from './balance'

// ------------------------------------
// Constants
Expand Down Expand Up @@ -174,8 +175,10 @@ export const fetchChannels = () => async dispatch => {
}

// Receive IPC event for channels
export const receiveChannels = (event, { channels, pendingChannels }) => dispatch =>
export const receiveChannels = (event, { channels, pendingChannels }) => dispatch => {
dispatch({ type: RECEIVE_CHANNELS, channels, pendingChannels })
dispatch(fetchBalance())
}

// Send IPC event for opening a channel
export const openChannel = ({ pubkey, host, local_amt }) => async (dispatch, getState) => {
Expand Down

0 comments on commit 60cb0b7

Please sign in to comment.