2017-12-13 11:01:37 +00:00
|
|
|
import React from 'react';
|
2018-08-10 15:18:22 +00:00
|
|
|
import { hot } from 'react-hot-loader';
|
2018-02-20 09:30:36 +00:00
|
|
|
import { Route, Switch } from 'react-router-dom';
|
|
|
|
import { Provider } from 'react-redux';
|
|
|
|
import { ConnectedRouter } from 'react-router-redux';
|
|
|
|
|
2018-08-16 14:58:28 +00:00
|
|
|
// general
|
2018-08-14 12:56:47 +00:00
|
|
|
import ErrorBoundary from 'support/ErrorBoundary';
|
2018-08-16 14:29:14 +00:00
|
|
|
import LandingContainer from 'views/Landing/Container';
|
2018-08-13 12:52:43 +00:00
|
|
|
|
2018-08-16 14:29:14 +00:00
|
|
|
// wallet views
|
2018-08-16 14:02:23 +00:00
|
|
|
import WalletContainer from 'views/Wallet';
|
2018-08-27 10:29:13 +00:00
|
|
|
import AccountReceive from 'views/Wallet/views/AccountReceive/Container';
|
2018-08-16 14:29:14 +00:00
|
|
|
import WalletDashboard from 'views/Wallet/views/Dashboard';
|
|
|
|
import WalletDeviceSettings from 'views/Wallet/views/DeviceSettings';
|
|
|
|
import WalletSettings from 'views/Wallet/views/WalletSettings';
|
|
|
|
import WalletBootloader from 'views/Wallet/views/Bootloader';
|
|
|
|
import WalletInitialize from 'views/Wallet/views/Initialize';
|
|
|
|
import WalletAcquire from 'views/Wallet/views/Acquire';
|
|
|
|
import WalletUnreadableDevice from 'views/Wallet/views/UnreadableDevice';
|
2018-08-16 13:56:39 +00:00
|
|
|
|
2018-08-16 14:58:28 +00:00
|
|
|
// wallet views - accounts
|
2018-08-27 08:45:47 +00:00
|
|
|
// import SummaryContainer from './Wallet/components/Summary/Container';
|
|
|
|
import AccountContainer from 'views/Wallet/views/Account/Container';
|
2018-08-16 14:02:23 +00:00
|
|
|
import SignVerifyContainer from './Wallet/components/Sign';
|
|
|
|
import SendFormContainer from './Wallet/components/Send/Container';
|
2018-08-16 13:56:39 +00:00
|
|
|
|
2018-08-14 14:06:34 +00:00
|
|
|
import store, { history } from '../store';
|
2018-02-20 09:30:36 +00:00
|
|
|
|
2018-08-10 15:18:22 +00:00
|
|
|
const App = () => (
|
2018-07-30 10:52:13 +00:00
|
|
|
<Provider store={store}>
|
|
|
|
<ConnectedRouter history={history}>
|
2018-02-20 09:30:36 +00:00
|
|
|
<Switch>
|
2018-08-16 10:19:13 +00:00
|
|
|
<Route exact path="/" component={LandingContainer} />
|
|
|
|
<Route exact path="/bridge" component={LandingContainer} />
|
|
|
|
<Route exact path="/import" component={LandingContainer} />
|
2018-02-20 09:30:36 +00:00
|
|
|
<Route>
|
2018-08-16 13:56:39 +00:00
|
|
|
<ErrorBoundary>
|
|
|
|
<WalletContainer>
|
2018-08-16 14:29:14 +00:00
|
|
|
<Route exact path="/settings" component={WalletSettings} />
|
|
|
|
<Route exact path="/device/:device/" component={WalletDashboard} />
|
|
|
|
<Route exact path="/device/:device/network/:network" component={WalletDashboard} />
|
|
|
|
<Route exact path="/device/:device/acquire" component={WalletAcquire} />
|
|
|
|
<Route exact path="/device/:device/unreadable" component={WalletUnreadableDevice} />
|
|
|
|
<Route exact path="/device/:device/bootloader" component={WalletBootloader} />
|
|
|
|
<Route exact path="/device/:device/initialize" component={WalletInitialize} />
|
|
|
|
<Route exact path="/device/:device/settings" component={WalletDeviceSettings} />
|
2018-08-27 08:45:47 +00:00
|
|
|
<Route exact path="/device/:device/network/:network/account/:account" component={AccountContainer} />
|
2018-08-13 12:52:43 +00:00
|
|
|
<Route path="/device/:device/network/:network/account/:account/send" component={SendFormContainer} />
|
|
|
|
<Route path="/device/:device/network/:network/account/:account/send/override" component={SendFormContainer} />
|
|
|
|
<Route path="/device/:device/network/:network/account/:account/signverify" component={SignVerifyContainer} />
|
2018-08-27 10:29:13 +00:00
|
|
|
<Route path="/device/:device/network/:network/account/:account/receive" component={AccountReceive} />
|
2018-08-16 13:56:39 +00:00
|
|
|
</WalletContainer>
|
|
|
|
</ErrorBoundary>
|
2018-02-20 09:30:36 +00:00
|
|
|
</Route>
|
|
|
|
</Switch>
|
|
|
|
</ConnectedRouter>
|
|
|
|
</Provider>
|
2018-08-10 15:18:22 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
export default hot(module)(App);
|