chore: general code cleanup

This commit is contained in:
Andre Neves 2019-03-20 09:04:34 -04:00
parent bc12b04601
commit 21d716c1b0
5 changed files with 13 additions and 9 deletions

View File

@ -1,8 +1,8 @@
// @flow
import { connect } from 'react-redux';
import { closeErrorModal } from '../redux/modules/app';
import { closeErrorModal } from '../redux/modules/app';
import { LayoutComponent } from '../components/layout';
import type { Dispatch } from '../types/redux';

View File

@ -6,16 +6,19 @@ import flow from 'lodash.flow';
import groupBy from 'lodash.groupby';
import dateFns from 'date-fns';
import { BigNumber } from 'bignumber.js';
import { DashboardView } from '../views/dashboard';
import rpc from '../../services/api';
import { listShieldedTransactions } from '../../services/shielded-transactions';
import store from '../../config/electron-store';
import { listShieldedTransactions } from '../../services/shielded-transactions';
import { sortByDescend } from '../utils/sort-by-descend';
import {
loadWalletSummary,
loadWalletSummarySuccess,
loadWalletSummaryError,
} from '../redux/modules/wallet';
import { sortByDescend } from '../utils/sort-by-descend';
import type { AppState } from '../types/app-state';
import type { Dispatch } from '../types/redux';

View File

@ -42,13 +42,13 @@ const mapDispatchToProps = (dispatch: Dispatch): MapDispatchToProps => ({
if (zAddressesErr || tAddressesErr) return dispatch(loadAddressesError({ error: 'Something went wrong!' }));
const latestzAddress = zAddresses[0]
const latestZAddress = zAddresses[0]
? {
address: zAddresses[0],
balance: await rpc.z_getbalance(zAddresses[0]),
}
: null;
const latesttAddress = transparentAddresses[0]
const latestTAddress = transparentAddresses[0]
? {
address: transparentAddresses[0],
balance: await rpc.z_getbalance(transparentAddresses[0]),
@ -68,7 +68,7 @@ const mapDispatchToProps = (dispatch: Dispatch): MapDispatchToProps => ({
dispatch(
loadAddressesSuccess({
addresses: [latestzAddress, latesttAddress, ...allAddresses].filter(Boolean),
addresses: [latestZAddress, latestTAddress, ...allAddresses].filter(Boolean),
}),
);
},

View File

@ -163,14 +163,14 @@ const mapDispatchToProps = (dispatch: Dispatch): MapDispatchToProps => ({
if (zAddressesErr || tAddressesErr) return dispatch(loadAddressesError({ error: 'Something went wrong!' }));
const latestzAddress = zAddresses[0]
const latestZAddress = zAddresses[0]
? {
address: zAddresses[0],
balance: await rpc.z_getbalance(zAddresses[0]),
}
: null;
const latesttAddress = transparentAddresses[0]
const latestTAddress = transparentAddresses[0]
? {
address: transparentAddresses[0],
balance: await rpc.z_getbalance(transparentAddresses[0]),
@ -190,7 +190,7 @@ const mapDispatchToProps = (dispatch: Dispatch): MapDispatchToProps => ({
return dispatch(
loadAddressesSuccess({
addresses: [latesttAddress, latestzAddress, ...allAddresses].filter(Boolean),
addresses: [latestTAddress, latestZAddress, ...allAddresses].filter(Boolean),
}),
);
},

View File

@ -1,4 +1,5 @@
// @flow
import eres from 'eres';
import { connect } from 'react-redux';
import electron from 'electron'; // eslint-disable-line