Skip to content
Permalink
Browse files

fix(ui): empty suggested nodes after logout

  • Loading branch information...
korhaliv committed Jun 11, 2019
1 parent 11d9ec7 commit c794d26b300c2d6b3de3bf11e9c6fc895cb55332
Showing with 8 additions and 5 deletions.
  1. +4 −0 renderer/components/App/App.js
  2. +3 −0 renderer/containers/App.js
  3. +1 −5 renderer/containers/Initializer.js
@@ -35,6 +35,7 @@ function App({
fetchTransactions,
setModals,
initBackupService,
fetchSuggestedNodes,
}) {
/**
* App scheduler / polling service setup. Add new app-wide polls here
@@ -78,12 +79,14 @@ function App({
fetchPeers()
// Update autopilot node scores.
updateAutopilotNodeScores()
fetchSuggestedNodes()
// initialize backup service in forceUseTokens mode to avoid
// launching it for wallets that don't have backup setup
initBackupService(undefined, true)
}, [
fetchActivityHistory,
fetchPeers,
fetchSuggestedNodes,
initBackupService,
setIsWalletOpen,
updateAutopilotNodeScores,
@@ -113,6 +116,7 @@ function App({
App.propTypes = {
fetchActivityHistory: PropTypes.func.isRequired,
fetchPeers: PropTypes.func.isRequired,
fetchSuggestedNodes: PropTypes.func.isRequired,
fetchTransactions: PropTypes.func.isRequired,
initBackupService: PropTypes.func.isRequired,
isAppReady: PropTypes.bool.isRequired,
@@ -7,6 +7,8 @@ import { fetchTransactions } from 'reducers/transaction'
import { appSelectors } from 'reducers/app'
import { initBackupService } from 'reducers/backup'
import { setModals, modalSelectors } from 'reducers/modal'
import { fetchSuggestedNodes } from 'reducers/channels'

import App from 'components/App'

const mapStateToProps = state => ({
@@ -23,6 +25,7 @@ const mapDispatchToProps = {
fetchTransactions,
setModals,
initBackupService,
fetchSuggestedNodes,
}

export default connect(
@@ -8,7 +8,7 @@ import { initNeutrino } from 'reducers/neutrino'
import { startActiveWallet } from 'reducers/lnd'
import { initTickers } from 'reducers/ticker'
import { initAutopay } from 'reducers/autopay'
import { fetchSuggestedNodes, initChannels } from 'reducers/channels'
import { initChannels } from 'reducers/channels'

/**
* Root component that deals with mounting the app and managing top level routing.
@@ -17,7 +17,6 @@ class Initializer extends React.Component {
static propTypes = {
activeWallet: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
activeWalletSettings: PropTypes.object,
fetchSuggestedNodes: PropTypes.func.isRequired,
hasWallets: PropTypes.bool,
initAutopay: PropTypes.func.isRequired,
initChannels: PropTypes.func.isRequired,
@@ -36,7 +35,6 @@ class Initializer extends React.Component {
*/
componentDidMount() {
const {
fetchSuggestedNodes,
initTickers,
initLocale,
initCurrency,
@@ -52,7 +50,6 @@ class Initializer extends React.Component {
initAutopay()
initWallets()
initChannels()
fetchSuggestedNodes()
}

/**
@@ -106,7 +103,6 @@ const mapStateToProps = state => ({

const mapDispatchToProps = {
startActiveWallet,
fetchSuggestedNodes,
initNeutrino,
initTickers,
initCurrency,

0 comments on commit c794d26

Please sign in to comment.
You can’t perform that action at this time.