diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-10-19 08:42:32 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-10-19 08:42:32 +0800 |
commit | 7bc2df56023641c27de62bc7e9a8953767cbc076 (patch) | |
tree | a1d2fad7ebe06d126474d25cf21647849456b42f /packages/instant/src/redux/store.ts | |
parent | 7a8adf9db5a83c3f44d6fe9e84e00ff1ec1e88e0 (diff) | |
download | dexon-0x-contracts-7bc2df56023641c27de62bc7e9a8953767cbc076.tar.gz dexon-0x-contracts-7bc2df56023641c27de62bc7e9a8953767cbc076.tar.zst dexon-0x-contracts-7bc2df56023641c27de62bc7e9a8953767cbc076.zip |
feat: add network to state and use it where relevant
Diffstat (limited to 'packages/instant/src/redux/store.ts')
-rw-r--r-- | packages/instant/src/redux/store.ts | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/packages/instant/src/redux/store.ts b/packages/instant/src/redux/store.ts index 88d964bbc..01deb8690 100644 --- a/packages/instant/src/redux/store.ts +++ b/packages/instant/src/redux/store.ts @@ -2,16 +2,12 @@ import * as _ from 'lodash'; import { createStore, Store as ReduxStore } from 'redux'; import { devToolsEnhancer } from 'redux-devtools-extension/developmentOnly'; -import { INITIAL_STATE, reducer, State } from './reducer'; +import { reducer, State } from './reducer'; export type Store = ReduxStore<State>; export const store = { - create: (withState: Partial<State>): Store => { - const allInitialState = { - ...INITIAL_STATE, - ...withState, - }; - return createStore(reducer, allInitialState, devToolsEnhancer({})); + create: (state: State): Store => { + return createStore(reducer, state, devToolsEnhancer({})); }, }; |