From 3b523980def653e1e8f18f5214291e96cc51eb59 Mon Sep 17 00:00:00 2001 From: zeppi Date: Mon, 4 Jan 2021 17:20:27 -0500 Subject: [PATCH] cleanup --- dist/bundle.es.js | 6 +++--- src/redux/actions/wallet.js | 5 +++-- src/redux/reducers/wallet.js | 1 - 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 2d46928..f8505ec 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -3091,6 +3091,7 @@ function doWalletUnlock(password) { }; } +// Collect all tips for a claim function doSupportAbandonForClaim(claimId, claimType, keep, preview) { return dispatch => { if (preview) { @@ -3110,7 +3111,7 @@ function doSupportAbandonForClaim(claimId, claimType, keep, preview) { if (!preview) { dispatch({ type: ABANDON_CLAIM_SUPPORT_COMPLETED, - data: { claimId, txid: res.txid, effective: res.outputs[0].amount, type: claimType } // add to pendingSupportTransactions, + data: { claimId, txid: res.txid, effective: res.outputs[0].amount, type: claimType } }); dispatch(doCheckPendingTxs()); } @@ -3210,7 +3211,7 @@ const doCheckPendingTxs = () => (dispatch, getState) => { const state = getState(); const pendingTxsById = selectPendingSupportTransactions(state); // {} const pendingOtherTxes = selectPendingOtherTransactions(state); - // + if (!Object.keys(pendingTxsById).length && !pendingOtherTxes.length) { return; } @@ -5978,7 +5979,6 @@ const walletReducer = handleActions({ }, [FETCH_UTXO_COUNT_COMPLETED]: (state, action) => { - // thing return _extends$d({}, state, { utxoCounts: action.data, fetchingUtxoCounts: false diff --git a/src/redux/actions/wallet.js b/src/redux/actions/wallet.js index 1ce3e61..f60e8dc 100644 --- a/src/redux/actions/wallet.js +++ b/src/redux/actions/wallet.js @@ -428,6 +428,7 @@ export function doWalletLock() { }; } +// Collect all tips for a claim export function doSupportAbandonForClaim(claimId, claimType, keep, preview) { return dispatch => { if (preview) { @@ -448,7 +449,7 @@ export function doSupportAbandonForClaim(claimId, claimType, keep, preview) { if (!preview) { dispatch({ type: ACTIONS.ABANDON_CLAIM_SUPPORT_COMPLETED, - data: { claimId, txid: res.txid, effective: res.outputs[0].amount, type: claimType }, // add to pendingSupportTransactions, + data: { claimId, txid: res.txid, effective: res.outputs[0].amount, type: claimType }, }); dispatch(doCheckPendingTxs()); } @@ -554,7 +555,7 @@ export const doCheckPendingTxs = () => (dispatch, getState) => { const state = getState(); const pendingTxsById = selectPendingSupportTransactions(state); // {} const pendingOtherTxes = selectPendingOtherTransactions(state); - // + if (!Object.keys(pendingTxsById).length && !pendingOtherTxes.length) { return; } diff --git a/src/redux/reducers/wallet.js b/src/redux/reducers/wallet.js index 441fea7..174cd16 100644 --- a/src/redux/reducers/wallet.js +++ b/src/redux/reducers/wallet.js @@ -155,7 +155,6 @@ export const walletReducer = handleActions( }, [ACTIONS.FETCH_UTXO_COUNT_COMPLETED]: (state: WalletState, action) => { - // thing return { ...state, utxoCounts: action.data,