record user earlier
This commit is contained in:
parent
75844ab064
commit
190386ae4c
3 changed files with 12 additions and 5 deletions
|
@ -12,6 +12,7 @@ type Props = {
|
|||
notifyUnlockWallet: () => Promise<any>,
|
||||
daemonVersionMatched: boolean,
|
||||
onReadyToLaunch: () => void,
|
||||
authenticate: () => void,
|
||||
notification: ?{
|
||||
id: string,
|
||||
},
|
||||
|
@ -61,8 +62,13 @@ export class SplashScreen extends React.PureComponent<Props, State> {
|
|||
}
|
||||
|
||||
updateStatusCallback(status) {
|
||||
const { notifyUnlockWallet } = this.props;
|
||||
const { notifyUnlockWallet, authenticate } = this.props;
|
||||
const { launchedModal } = this.state;
|
||||
|
||||
if (status) {
|
||||
authenticate();
|
||||
}
|
||||
|
||||
if (status.wallet && status.wallet.is_locked) {
|
||||
this.setState({
|
||||
isRunning: true,
|
||||
|
|
|
@ -11,7 +11,7 @@ import { doConditionalAuthNavigate, doDaemonReady, doAutoUpdate } from 'redux/ac
|
|||
import { doNotify, doBlackListedOutpointsSubscribe, isURIValid } from 'lbry-redux';
|
||||
import { doNavigate } from 'redux/actions/navigation';
|
||||
import { doDownloadLanguages, doUpdateIsNightAsync } from 'redux/actions/settings';
|
||||
import { doUserEmailVerify } from 'redux/actions/user';
|
||||
import { doUserEmailVerify, doAuthenticate } from 'redux/actions/user';
|
||||
import 'scss/all.scss';
|
||||
import store from 'store';
|
||||
import app from './app';
|
||||
|
@ -155,7 +155,10 @@ const init = () => {
|
|||
} else {
|
||||
ReactDOM.render(
|
||||
<Provider store={store}>
|
||||
<SplashScreen onReadyToLaunch={onDaemonReady} />
|
||||
<SplashScreen
|
||||
authenticate={() => app.store.dispatch(doAuthenticate())}
|
||||
onReadyToLaunch={onDaemonReady}
|
||||
/>
|
||||
</Provider>,
|
||||
document.getElementById('app')
|
||||
);
|
||||
|
|
|
@ -16,7 +16,6 @@ import Native from 'native';
|
|||
import { doFetchRewardedContent } from 'redux/actions/content';
|
||||
import { doFetchDaemonSettings } from 'redux/actions/settings';
|
||||
import { doAuthNavigate } from 'redux/actions/navigation';
|
||||
import { doAuthenticate } from 'redux/actions/user';
|
||||
import { doPause } from 'redux/actions/media';
|
||||
import { doCheckSubscriptions } from 'redux/actions/subscriptions';
|
||||
import {
|
||||
|
@ -337,7 +336,6 @@ export function doDaemonReady() {
|
|||
return (dispatch, getState) => {
|
||||
const state = getState();
|
||||
|
||||
dispatch(doAuthenticate());
|
||||
dispatch({ type: ACTIONS.DAEMON_READY });
|
||||
dispatch(doFetchDaemonSettings());
|
||||
dispatch(doBalanceSubscribe());
|
||||
|
|
Loading…
Reference in a new issue