2019-04-25 10:58:00 +00:00
|
|
|
import { hot } from 'react-hot-loader/root';
|
2017-12-13 11:01:37 +00:00
|
|
|
import React from 'react';
|
2018-02-20 09:30:36 +00:00
|
|
|
import { Route, Switch } from 'react-router-dom';
|
|
|
|
import { Provider } from 'react-redux';
|
2018-12-18 13:33:01 +00:00
|
|
|
import { ConnectedRouter } from 'connected-react-router';
|
2018-02-20 09:30:36 +00:00
|
|
|
|
2018-08-16 14:58:28 +00:00
|
|
|
// general
|
2019-02-06 17:01:09 +00:00
|
|
|
import ConnectedIntlProvider from 'support/ConnectedIntlProvider';
|
2018-08-14 12:56:47 +00:00
|
|
|
import ErrorBoundary from 'support/ErrorBoundary';
|
2018-11-06 12:15:12 +00:00
|
|
|
import ImagesPreloader from 'support/ImagesPreloader';
|
2019-02-19 20:48:48 +00:00
|
|
|
import Version from 'views/Landing/views/Version';
|
2018-09-21 10:41:13 +00:00
|
|
|
import { getPattern } from 'support/routes';
|
2018-10-15 08:46:58 +00:00
|
|
|
|
|
|
|
// landing views
|
|
|
|
import RootView from 'views/Landing/views/Root/Container';
|
|
|
|
import InstallBridge from 'views/Landing/views/InstallBridge/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-11-26 14:45:44 +00:00
|
|
|
import AccountSummary from 'views/Wallet/views/Account/Summary';
|
2019-04-26 15:21:39 +00:00
|
|
|
import AccountTransactions from 'views/Wallet/views/Account/Transactions';
|
2018-11-27 09:58:51 +00:00
|
|
|
import AccountSend from 'views/Wallet/views/Account/Send';
|
2018-12-03 20:26:52 +00:00
|
|
|
import AccountReceive from 'views/Wallet/views/Account/Receive';
|
2018-10-16 22:31:33 +00:00
|
|
|
import AccountSignVerify from 'views/Wallet/views/Account/SignVerify/Container';
|
2018-08-27 10:32:27 +00:00
|
|
|
|
2019-04-08 16:30:11 +00:00
|
|
|
import WalletImport from 'views/Wallet/views/Import/Container';
|
2019-03-22 11:24:41 +00:00
|
|
|
import WalletDashboard from 'views/Wallet/views/Dashboard/Container';
|
2018-08-16 14:29:14 +00:00
|
|
|
import WalletDeviceSettings from 'views/Wallet/views/DeviceSettings';
|
2019-03-12 17:13:38 +00:00
|
|
|
import WalletSettings from 'views/Wallet/views/WalletSettings/Container';
|
2018-08-16 14:29:14 +00:00
|
|
|
import WalletBootloader from 'views/Wallet/views/Bootloader';
|
2018-10-03 10:42:09 +00:00
|
|
|
import WalletFirmwareUpdate from 'views/Wallet/views/FirmwareUpdate';
|
2019-02-25 12:28:58 +00:00
|
|
|
import WalletNoBackup from 'views/Wallet/views/NoBackup';
|
2018-08-16 14:29:14 +00:00
|
|
|
import WalletInitialize from 'views/Wallet/views/Initialize';
|
2018-11-01 09:53:56 +00:00
|
|
|
import WalletSeedless from 'views/Wallet/views/Seedless';
|
2018-08-16 14:29:14 +00:00
|
|
|
import WalletAcquire from 'views/Wallet/views/Acquire';
|
|
|
|
import WalletUnreadableDevice from 'views/Wallet/views/UnreadableDevice';
|
2018-08-16 13:56:39 +00:00
|
|
|
|
2018-09-05 09:36:50 +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}>
|
2019-02-06 17:01:09 +00:00
|
|
|
<ConnectedIntlProvider>
|
|
|
|
<ConnectedRouter history={history}>
|
|
|
|
<Switch>
|
|
|
|
<Route exact path={getPattern('landing-home')} component={RootView} />
|
2019-02-22 11:04:16 +00:00
|
|
|
<Route exact path={getPattern('landing-version')} component={Version} />
|
2019-02-06 17:01:09 +00:00
|
|
|
<Route exact path={getPattern('landing-bridge')} component={InstallBridge} />
|
|
|
|
<Route>
|
|
|
|
<ErrorBoundary>
|
|
|
|
<ImagesPreloader />
|
|
|
|
<WalletContainer>
|
2019-04-08 16:30:11 +00:00
|
|
|
<Route
|
|
|
|
exact
|
|
|
|
path={getPattern('wallet-import')}
|
|
|
|
component={WalletImport}
|
|
|
|
/>
|
|
|
|
|
2019-03-04 12:33:02 +00:00
|
|
|
<Route
|
|
|
|
exact
|
|
|
|
path={getPattern('wallet-settings')}
|
|
|
|
component={WalletSettings}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
exact
|
|
|
|
path={getPattern('wallet-dashboard')}
|
|
|
|
component={WalletDashboard}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
exact
|
|
|
|
path={getPattern('wallet-acquire')}
|
|
|
|
component={WalletAcquire}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
exact
|
|
|
|
path={getPattern('wallet-unreadable')}
|
|
|
|
component={WalletUnreadableDevice}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
exact
|
|
|
|
path={getPattern('wallet-bootloader')}
|
|
|
|
component={WalletBootloader}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
exact
|
|
|
|
path={getPattern('wallet-initialize')}
|
|
|
|
component={WalletInitialize}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
exact
|
|
|
|
path={getPattern('wallet-seedless')}
|
|
|
|
component={WalletSeedless}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
exact
|
|
|
|
path={getPattern('wallet-firmware-update')}
|
|
|
|
component={WalletFirmwareUpdate}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
exact
|
|
|
|
path={getPattern('wallet-backup')}
|
|
|
|
component={WalletNoBackup}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
exact
|
|
|
|
path={getPattern('wallet-device-settings')}
|
|
|
|
component={WalletDeviceSettings}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
exact
|
|
|
|
path={getPattern('wallet-account-summary')}
|
|
|
|
component={AccountSummary}
|
|
|
|
/>
|
2019-04-26 15:21:39 +00:00
|
|
|
<Route
|
|
|
|
path={getPattern('wallet-account-transactions')}
|
|
|
|
component={AccountTransactions}
|
|
|
|
/>
|
2019-03-04 12:33:02 +00:00
|
|
|
<Route
|
|
|
|
path={getPattern('wallet-account-send')}
|
|
|
|
component={AccountSend}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
path={getPattern('wallet-account-send-override')}
|
|
|
|
component={AccountSend}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
path={getPattern('wallet-account-receive')}
|
|
|
|
component={AccountReceive}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
path={getPattern('wallet-account-signverify')}
|
|
|
|
component={AccountSignVerify}
|
|
|
|
/>
|
2019-02-06 17:01:09 +00:00
|
|
|
</WalletContainer>
|
|
|
|
</ErrorBoundary>
|
|
|
|
</Route>
|
|
|
|
</Switch>
|
|
|
|
</ConnectedRouter>
|
|
|
|
</ConnectedIntlProvider>
|
2018-02-20 09:30:36 +00:00
|
|
|
</Provider>
|
2018-08-10 15:18:22 +00:00
|
|
|
);
|
|
|
|
|
2019-04-25 10:58:00 +00:00
|
|
|
export default hot(App);
|