Merge pull request #837 from lbryio/abandon-fix

Another fix for abandoning claims
This commit is contained in:
Jeremy Kauffman 2017-12-11 10:22:28 -05:00 committed by GitHub
commit fce25f8efc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 10 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

@ -103,7 +103,7 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
if (fileInfo) { if (fileInfo) {
const txid = fileInfo.outpoint.slice(0, -2); const txid = fileInfo.outpoint.slice(0, -2);
const nout = fileInfo.outpoint.slice(-1); const nout = Number(fileInfo.outpoint.slice(-1));
dispatch(doAbandonClaim(txid, nout)); 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) { 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: {