diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-11-07 12:25:30 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-11-08 01:32:49 +0800 |
commit | dfbf10c94bfbbdbca353531c5cae6707e05981f0 (patch) | |
tree | 6b1f2832742517b280d7a7594adfa6fec4ea7bef /packages/instant/src/redux/store.ts | |
parent | c30dca69619bf87ed198cf375d21593213798113 (diff) | |
download | dexon-0x-contracts-dfbf10c94bfbbdbca353531c5cae6707e05981f0.tar.gz dexon-0x-contracts-dfbf10c94bfbbdbca353531c5cae6707e05981f0.tar.zst dexon-0x-contracts-dfbf10c94bfbbdbca353531c5cae6707e05981f0.zip |
feat(instant): fallback to an empty wallet provider when none is injected
Diffstat (limited to 'packages/instant/src/redux/store.ts')
-rw-r--r-- | packages/instant/src/redux/store.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/instant/src/redux/store.ts b/packages/instant/src/redux/store.ts index 01deb8690..20710765d 100644 --- a/packages/instant/src/redux/store.ts +++ b/packages/instant/src/redux/store.ts @@ -2,12 +2,13 @@ import * as _ from 'lodash'; import { createStore, Store as ReduxStore } from 'redux'; import { devToolsEnhancer } from 'redux-devtools-extension/developmentOnly'; -import { reducer, State } from './reducer'; +import { createReducer, State } from './reducer'; export type Store = ReduxStore<State>; export const store = { - create: (state: State): Store => { - return createStore(reducer, state, devToolsEnhancer({})); + create: (initialState: State): Store => { + const reducer = createReducer(initialState); + return createStore(reducer, initialState, devToolsEnhancer({})); }, }; |