Another fix for abandoning claims #837

Merged
hackrush01 merged 2 commits from abandon-fix into master 2017-12-11 16:22:29 +01:00
4 changed files with 12 additions and 10 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

@ -103,7 +103,7 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
if (fileInfo) {
const txid = fileInfo.outpoint.slice(0, -2);
const nout = fileInfo.outpoint.slice(-1);
const nout = Number(fileInfo.outpoint.slice(-1));
dispatch(doAbandonClaim(txid, nout));
}

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: {