eslint ./src/reducers

pull/86/head
Szymon Lesisz 6 years ago
parent de7e8914cb
commit d684eec819

@ -45,7 +45,7 @@ const createAccount = (state: State, account: Account): State => {
if (exist) {
return state;
}
const newState: State = [ ...state ];
const newState: State = [...state];
newState.push(account);
return newState;
};
@ -66,7 +66,7 @@ const updateAccount = (state: State, account: Account): State => {
const newState: State = [...state];
newState[index] = account;
return newState;
}
};
const setBalance = (state: State, action: AccountSetBalanceAction): State => {
// const index: number = state.findIndex(account => account.address === action.address && account.network === action.network && account.deviceState === action.deviceState);
@ -100,7 +100,7 @@ export default (state: State = initialState, action: Action): State => {
//case CONNECT.FORGET_SINGLE :
// return forgetAccounts(state, action);
case ACCOUNT.UPDATE :
case ACCOUNT.UPDATE:
return updateAccount(state, action.payload);
case ACCOUNT.SET_BALANCE:

@ -1,6 +1,5 @@
/* @flow */
import { RATE_UPDATE } from 'services/CoinmarketcapService';
import type { Action } from 'flowtype';
@ -27,7 +26,6 @@ const update = (state: Array<Fiat>, action: FiatRateAction): Array<Fiat> => {
return newState;
};
export default (state: Array<Fiat> = initialState, action: Action): Array<Fiat> => {
switch (action.type) {
case RATE_UPDATE:

@ -94,7 +94,6 @@ export default function modal(state: State = initialState, action: Action): Stat
case UI.CLOSE_UI_WINDOW:
case MODAL.CLOSE:
case CONNECT.FORGET:
case CONNECT.FORGET_SINGLE:
case CONNECT.REMEMBER:

@ -39,11 +39,13 @@ const add = (state: State, action: SendTxAction): State => {
return newState;
};
const add_NEW = (state: State, payload: any): State => {
/*
const addFromBloockbokNotifiaction = (state: State, payload: any): State => {
const newState = [...state];
newState.push(payload);
return newState;
};
*/
const remove = (state: State, id: string): State => state.filter(tx => tx.id !== id);

@ -4,7 +4,6 @@
import Web3 from 'web3';
import type { Contract } from 'web3';
import * as STORAGE from 'actions/constants/localStorage';
import * as WEB3 from 'actions/constants/web3';
import type { Action } from 'flowtype';

@ -40,7 +40,7 @@ const reducers = {
fiat,
wallet,
devices,
blockchain
blockchain,
};
export type Reducers = typeof reducers;

Loading…
Cancel
Save