Another fix for abandoning claims

This commit is contained in:
hackrush 2017-12-11 01:57:55 +05:30
parent 4f22ba8313
commit c3582c2c09
3 changed files with 11 additions and 9 deletions

View file

@ -100,22 +100,23 @@ export class SplashScreen extends React.PureComponent {
render() { render() {
const { modal } = this.props; const { modal } = this.props;
const { message, details, isLagging, isRunning } = this.state;
return ( return (
<div> <div>
<LoadScreen <LoadScreen
message={this.state.message} message={message}
details={this.state.details} details={details}
isWarning={this.state.isLagging} isWarning={isLagging}
/> />
{/* Temp hack: don't show any modals on splash screen daemon is running; {/* Temp hack: don't show any modals on splash screen daemon is running;
daemon doesn't let you quit during startup, so the "Quit" buttons daemon doesn't let you quit during startup, so the "Quit" buttons
in the modals won't work. */} in the modals won't work. */}
{modal == "incompatibleDaemon" && {modal == "incompatibleDaemon" &&
this.state.isRunning && <ModalIncompatibleDaemon />} isRunning && <ModalIncompatibleDaemon />}
{modal == modals.UPGRADE && this.state.isRunning && <ModalUpgrade />} {modal == modals.UPGRADE && isRunning && <ModalUpgrade />}
{modal == modals.DOWNLOADING && {modal == modals.DOWNLOADING &&
this.state.isRunning && <ModalDownloading />} isRunning && <ModalDownloading />}
</div> </div>
); );
} }

View file

@ -9,7 +9,7 @@ import {
selectRemoteVersion, selectRemoteVersion,
} from "redux/selectors/app"; } from "redux/selectors/app";
import { doFetchDaemonSettings } from "redux/actions/settings"; import { doFetchDaemonSettings } from "redux/actions/settings";
import { doBalanceSubscribe } from "redux/actions/wallet"; import { doBalanceSubscribe, doFetchTransactions } from "redux/actions/wallet";
import { doAuthenticate } from "redux/actions/user"; import { doAuthenticate } from "redux/actions/user";
import { doFetchFileInfosAndPublishedClaims } from "redux/actions/file_info"; import { doFetchFileInfosAndPublishedClaims } from "redux/actions/file_info";
import * as modals from "constants/modal_types"; import * as modals from "constants/modal_types";
@ -222,6 +222,7 @@ export function doDaemonReady() {
dispatch(doBalanceSubscribe()); dispatch(doBalanceSubscribe());
dispatch(doFetchFileInfosAndPublishedClaims()); dispatch(doFetchFileInfosAndPublishedClaims());
dispatch(doFetchRewardedContent()); dispatch(doFetchRewardedContent());
dispatch(doFetchTransactions(false));
if (!selectIsUpgradeSkipped(state)) { if (!selectIsUpgradeSkipped(state)) {
dispatch(doCheckUpgradeAvailable()); dispatch(doCheckUpgradeAvailable());
} }

View file

@ -29,13 +29,13 @@ export function doBalanceSubscribe() {
}; };
} }
export function doFetchTransactions() { export function doFetchTransactions(fetch_tip_info = true) {
return function(dispatch, getState) { return function(dispatch, getState) {
dispatch({ dispatch({
type: types.FETCH_TRANSACTIONS_STARTED, type: types.FETCH_TRANSACTIONS_STARTED,
}); });
lbry.transaction_list({ include_tip_info: true }).then(results => { lbry.transaction_list({ include_tip_info: fetch_tip_info }).then(results => {
dispatch({ dispatch({
type: types.FETCH_TRANSACTIONS_COMPLETED, type: types.FETCH_TRANSACTIONS_COMPLETED,
data: { data: {