From 5451c15274dec5215b749febecbd86aa5aeaaa91 Mon Sep 17 00:00:00 2001 From: apanizo Date: Tue, 14 Aug 2018 12:59:52 +0200 Subject: [PATCH] WA-521 Do not init redux with txs data when loading app --- src/routes/safe/store/reducer/transactions.js | 3 --- src/store/index.js | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/routes/safe/store/reducer/transactions.js b/src/routes/safe/store/reducer/transactions.js index 905eb764..ed4bc7ba 100644 --- a/src/routes/safe/store/reducer/transactions.js +++ b/src/routes/safe/store/reducer/transactions.js @@ -3,14 +3,11 @@ import { List, Map } from 'immutable' import { handleActions, type ActionType } from 'redux-actions' import addTransactions, { ADD_TRANSACTIONS } from '~/routes/safe/store/actions/addTransactions' import { type Transaction } from '~/routes/safe/store/model/transaction' -import { loadSafeTransactions } from '~/routes/safe/store/actions/fetchTransactions' export const TRANSACTIONS_REDUCER_ID = 'transactions' export type State = Map> -export const transactionsInitialState = () => loadSafeTransactions() - export default handleActions({ [ADD_TRANSACTIONS]: (state: State, action: ActionType): State => action.payload, diff --git a/src/store/index.js b/src/store/index.js index cb93ed1e..5078794a 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -6,7 +6,7 @@ import thunk from 'redux-thunk' import provider, { PROVIDER_REDUCER_ID, type State as ProviderState } from '~/logic/wallets/store/reducer/provider' import safe, { SAFE_REDUCER_ID, type State as SafeState } from '~/routes/safe/store/reducer/safe' import tokens, { TOKEN_REDUCER_ID, type State as TokensState } from '~/routes/tokens/store/reducer/tokens' -import transactions, { type State as TransactionsState, transactionsInitialState, TRANSACTIONS_REDUCER_ID } from '~/routes/safe/store/reducer/transactions' +import transactions, { type State as TransactionsState, TRANSACTIONS_REDUCER_ID } from '~/routes/safe/store/reducer/transactions' export const history = createBrowserHistory() @@ -32,11 +32,13 @@ const reducers: Reducer = combineReducers({ [TRANSACTIONS_REDUCER_ID]: transactions, }) +/* const initialState = { [TRANSACTIONS_REDUCER_ID]: transactionsInitialState(), } +*/ -export const store: Store = createStore(reducers, initialState, finalCreateStore) +export const store: Store = createStore(reducers, {}, finalCreateStore) export const aNewStore = (localState?: Object): Store => createStore(reducers, localState, finalCreateStore)