From c3582c2c09bbb11492f74c32d0cdb9290be97f77 Mon Sep 17 00:00:00 2001 From: hackrush Date: Mon, 11 Dec 2017 01:57:55 +0530 Subject: [PATCH 1/2] Another fix for abandoning claims --- src/renderer/component/splash/view.jsx | 13 +++++++------ src/renderer/redux/actions/app.js | 3 ++- src/renderer/redux/actions/wallet.js | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/renderer/component/splash/view.jsx b/src/renderer/component/splash/view.jsx index eabe723c5..5697eb7cd 100644 --- a/src/renderer/component/splash/view.jsx +++ b/src/renderer/component/splash/view.jsx @@ -100,22 +100,23 @@ export class SplashScreen extends React.PureComponent { render() { const { modal } = this.props; + const { message, details, isLagging, isRunning } = this.state; return (
{/* 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 && } - {modal == modals.UPGRADE && this.state.isRunning && } + isRunning && } + {modal == modals.UPGRADE && isRunning && } {modal == modals.DOWNLOADING && - this.state.isRunning && } + isRunning && }
); } diff --git a/src/renderer/redux/actions/app.js b/src/renderer/redux/actions/app.js index bf82fb269..46b2e5fa1 100644 --- a/src/renderer/redux/actions/app.js +++ b/src/renderer/redux/actions/app.js @@ -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()); } diff --git a/src/renderer/redux/actions/wallet.js b/src/renderer/redux/actions/wallet.js index 09efea390..5db24d939 100644 --- a/src/renderer/redux/actions/wallet.js +++ b/src/renderer/redux/actions/wallet.js @@ -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: { From 03678fb4f2b1128a68c20731f72f697ed034c52b Mon Sep 17 00:00:00 2001 From: hackrush Date: Mon, 11 Dec 2017 12:51:18 +0530 Subject: [PATCH 2/2] Typecasted nout to number --- src/renderer/redux/actions/file_info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/redux/actions/file_info.js b/src/renderer/redux/actions/file_info.js index 89e50386f..2226fd639 100644 --- a/src/renderer/redux/actions/file_info.js +++ b/src/renderer/redux/actions/file_info.js @@ -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)); }