Fix for generating a wallet address on load

This commit is contained in:
6ea86b96 2017-04-22 20:46:04 +07:00 committed by Jeremy Kauffman
parent da9d29ed6a
commit 763dd6197e
3 changed files with 7 additions and 7 deletions

View file

@ -10,6 +10,9 @@ import {AuthOverlay} from './component/auth.js';
import { Provider } from 'react-redux';
import store from 'store.js';
import { runTriggers } from 'triggers'
import {
doDaemonReady
} from 'actions/app'
const {remote} = require('electron');
const contextMenu = remote.require('./menu/context-menu');
@ -37,7 +40,7 @@ var init = function() {
})
function onDaemonReady() {
window.sessionStorage.setItem('loaded', 'y'); //once we've made it here once per session, we don't need to show splash again
app.store.dispatch(doDaemonReady())
ReactDOM.render(<Provider store={store}><div>{ lbryio.enabled ? <AuthOverlay/> : '' }<App /><SnackBar /></div></Provider>, canvas)
}

View file

@ -94,7 +94,7 @@ reducers[types.UPGRADE_DOWNLOAD_PROGRESSED] = function(state, action) {
}
reducers[types.DAEMON_READY] = function(state, action) {
// sessionStorage.setItem('loaded', 'y');
window.sessionStorage.setItem('loaded', 'y')
return Object.assign({}, state, {
daemonReady: true
})

View file

@ -1,6 +1,7 @@
import { createSelector } from 'reselect'
import {
selectCurrentPage,
selectDaemonReady,
} from 'selectors/app'
export const _selectState = state => state.wallet || {}
@ -77,10 +78,6 @@ export const selectGettingNewAddress = createSelector(
(state) => state.gettingNewAddress
)
export const selectDaemonReady = createSelector(
() => sessionStorage.getItem('loaded') == 'y'
)
export const shouldGetReceiveAddress = createSelector(
selectReceiveAddress,
selectGettingNewAddress,
@ -88,7 +85,7 @@ export const shouldGetReceiveAddress = createSelector(
(address, fetching, daemonReady) => {
if (!daemonReady) return false
if (fetching) return false
if (address !== undefined) return false
if (address) return false
return true
}