1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-15 12:59:09 +00:00
trezor-wallet/src/reducers/index.js

68 lines
1.9 KiB
JavaScript
Raw Normal View History

2017-12-13 11:01:37 +00:00
/* @flow */
import { combineReducers } from 'redux';
import { connectRouter } from 'connected-react-router';
2019-01-02 15:42:07 +00:00
import type { State } from 'connected-react-router';
2017-12-13 11:01:37 +00:00
2018-08-14 14:06:34 +00:00
import log from 'reducers/LogReducer';
import localStorage from 'reducers/LocalStorageReducer';
import connect from 'reducers/TrezorConnectReducer';
import notifications from 'reducers/NotificationReducer';
import modal from 'reducers/ModalReducer';
import web3 from 'reducers/Web3Reducer';
import accounts from 'reducers/AccountsReducer';
import selectedAccount from 'reducers/SelectedAccountReducer';
import sendFormEthereum from 'reducers/SendFormEthereumReducer';
import sendFormRipple from 'reducers/SendFormRippleReducer';
2018-08-14 14:06:34 +00:00
import receive from 'reducers/ReceiveReducer';
import summary from 'reducers/SummaryReducer';
import tokens from 'reducers/TokensReducer';
import discovery from 'reducers/DiscoveryReducer';
import pending from 'reducers/PendingTxReducer';
import fiat from 'reducers/FiatRateReducer';
import wallet from 'reducers/WalletReducer';
import devices from 'reducers/DevicesReducer';
2018-09-12 09:49:49 +00:00
import blockchain from 'reducers/BlockchainReducer';
import signVerify from 'reducers/SignVerifyReducer';
2017-12-13 11:01:37 +00:00
2019-01-02 15:42:07 +00:00
const reducers = {
2018-03-08 16:10:53 +00:00
log,
2018-02-20 09:30:36 +00:00
localStorage,
2017-12-13 11:01:37 +00:00
connect,
2018-02-20 09:30:36 +00:00
notifications,
2017-12-13 11:01:37 +00:00
modal,
web3,
2018-02-20 09:30:36 +00:00
accounts,
2018-05-18 17:26:46 +00:00
selectedAccount,
sendFormEthereum,
sendFormRipple,
2018-02-20 09:30:36 +00:00
receive,
summary,
tokens,
2018-03-08 16:10:53 +00:00
discovery,
pending,
fiat,
wallet,
2018-07-30 10:52:13 +00:00
devices,
2018-09-23 06:36:01 +00:00
blockchain,
signVerify,
2019-03-04 12:33:02 +00:00
router: () =>
({
location: {
pathname: '',
hash: '',
search: '',
state: {},
},
}: State),
2019-01-02 15:42:07 +00:00
};
2018-04-16 21:19:50 +00:00
export type Reducers = typeof reducers;
type $ExtractFunctionReturn = <V>(v: (...args: any) => V) => V;
export type ReducersState = $ObjMap<Reducers, $ExtractFunctionReturn>;
2019-01-02 15:42:07 +00:00
2019-03-04 12:33:02 +00:00
export default (history: any) =>
combineReducers({
...reducers,
router: connectRouter(history),
});