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() {
const { modal } = this.props;
const { message, details, isLagging, isRunning } = this.state;
return (
<div>
<LoadScreen
message={this.state.message}
details={this.state.details}
isWarning={this.state.isLagging}
message={message}
details={details}
isWarning={isLagging}
/>
{/* 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
in the modals won't work. */}
{modal == "incompatibleDaemon" &&
this.state.isRunning && <ModalIncompatibleDaemon />}
{modal == modals.UPGRADE && this.state.isRunning && <ModalUpgrade />}
isRunning && <ModalIncompatibleDaemon />}
{modal == modals.UPGRADE && isRunning && <ModalUpgrade />}
{modal == modals.DOWNLOADING &&
this.state.isRunning && <ModalDownloading />}
isRunning && <ModalDownloading />}
</div>
);
}

View file

@ -9,7 +9,7 @@ import {
selectRemoteVersion,
} from "redux/selectors/app";
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 { doFetchFileInfosAndPublishedClaims } from "redux/actions/file_info";
import * as modals from "constants/modal_types";
@ -222,6 +222,7 @@ export function doDaemonReady() {
dispatch(doBalanceSubscribe());
dispatch(doFetchFileInfosAndPublishedClaims());
dispatch(doFetchRewardedContent());
dispatch(doFetchTransactions(false));
if (!selectIsUpgradeSkipped(state)) {
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) {
dispatch({
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({
type: types.FETCH_TRANSACTIONS_COMPLETED,
data: {