diff --git a/src/js/actions/AccountsActions.js b/src/js/actions/AccountsActions.js index 13dd4853..ba4dd1a6 100644 --- a/src/js/actions/AccountsActions.js +++ b/src/js/actions/AccountsActions.js @@ -1,8 +1,8 @@ /* @flow */ -import * as ACCOUNT from './constants/account'; +import * as ACCOUNT from 'actions/constants/account'; import type { Action, TrezorDevice } from 'flowtype'; -import type { State } from '../reducers/AccountsReducer'; +import type { State } from 'reducers/AccountsReducer'; export type AccountAction = AccountFromStorageAction diff --git a/src/js/actions/DiscoveryActions.js b/src/js/actions/DiscoveryActions.js index 02562f51..27264681 100644 --- a/src/js/actions/DiscoveryActions.js +++ b/src/js/actions/DiscoveryActions.js @@ -3,10 +3,10 @@ import TrezorConnect from 'trezor-connect'; import HDKey from 'hdkey'; import EthereumjsUtil from 'ethereumjs-util'; -import * as DISCOVERY from './constants/discovery'; -import * as ACCOUNT from './constants/account'; -import * as TOKEN from './constants/token'; -import * as NOTIFICATION from './constants/notification'; +import * as DISCOVERY from 'actions/constants/discovery'; +import * as ACCOUNT from 'actions/constants/account'; +import * as TOKEN from 'actions/constants/token'; +import * as NOTIFICATION from 'actions/constants/notification'; import * as AccountsActions from './AccountsActions'; import { getNonceAsync, getBalanceAsync, getTokenBalanceAsync } from './Web3Actions'; @@ -16,7 +16,7 @@ import type { ThunkAction, AsyncAction, Action, GetState, Dispatch, TrezorDevice, } from 'flowtype'; -import type { Discovery, State } from '../reducers/DiscoveryReducer'; +import type { Discovery, State } from 'reducers/DiscoveryReducer'; export type DiscoveryAction = { type: typeof DISCOVERY.FROM_STORAGE, diff --git a/src/js/actions/LocalStorageActions.js b/src/js/actions/LocalStorageActions.js index 443593be..a434af9a 100644 --- a/src/js/actions/LocalStorageActions.js +++ b/src/js/actions/LocalStorageActions.js @@ -1,18 +1,18 @@ /* @flow */ -import * as CONNECT from './constants/TrezorConnect'; -import * as ACCOUNT from './constants/account'; -import * as TOKEN from './constants/token'; -import * as DISCOVERY from './constants/discovery'; -import * as STORAGE from './constants/localStorage'; -import * as PENDING from './constants/pendingTx'; -import { JSONRequest, httpRequest } from '../utils/networkUtils'; +import * as CONNECT from 'actions/constants/TrezorConnect'; +import * as ACCOUNT from 'actions/constants/account'; +import * as TOKEN from 'actions/constants/token'; +import * as DISCOVERY from 'actions/constants/discovery'; +import * as STORAGE from 'actions/constants/localStorage'; +import * as PENDING from 'actions/constants/pendingTx'; +import { JSONRequest, httpRequest } from 'utils/networkUtils'; import type { ThunkAction, AsyncAction, GetState, Dispatch, TrezorDevice, } from 'flowtype'; -import type { Config, Coin, TokensCollection } from '../reducers/LocalStorageReducer'; +import type { Config, Coin, TokensCollection } from 'reducers/LocalStorageReducer'; import AppConfigJSON from 'data/appConfig.json'; import Erc20AbiJSON from 'data/ERC20Abi.json'; diff --git a/src/js/actions/LogActions.js b/src/js/actions/LogActions.js index 871c8fe6..c841cd1e 100644 --- a/src/js/actions/LogActions.js +++ b/src/js/actions/LogActions.js @@ -1,12 +1,12 @@ /* @flow */ -import * as LOG from './constants/log'; +import * as LOG from 'actions/constants/log'; import type { Action, ThunkAction, GetState, Dispatch, } from 'flowtype'; -import type { LogEntry } from '../reducers/LogReducer'; +import type { LogEntry } from 'reducers/LogReducer'; export type LogAction = { type: typeof LOG.OPEN, diff --git a/src/js/actions/ModalActions.js b/src/js/actions/ModalActions.js index 53eee676..c4e75f56 100644 --- a/src/js/actions/ModalActions.js +++ b/src/js/actions/ModalActions.js @@ -3,13 +3,13 @@ import TrezorConnect, { UI, UI_EVENT } from 'trezor-connect'; import type { Device } from 'trezor-connect'; -import * as MODAL from './constants/modal'; -import * as CONNECT from './constants/TrezorConnect'; +import * as MODAL from 'actions/constants/modal'; +import * as CONNECT from 'actions/constants/TrezorConnect'; import type { ThunkAction, AsyncAction, Action, GetState, Dispatch, TrezorDevice, } from 'flowtype'; -import type { State } from '../reducers/ModalReducer'; +import type { State } from 'reducers/ModalReducer'; export type ModalAction = { type: typeof MODAL.CLOSE diff --git a/src/js/actions/NotificationActions.js b/src/js/actions/NotificationActions.js index c2fd37c6..05f8b685 100644 --- a/src/js/actions/NotificationActions.js +++ b/src/js/actions/NotificationActions.js @@ -1,12 +1,12 @@ /* @flow */ -import * as NOTIFICATION from './constants/notification'; +import * as NOTIFICATION from 'actions/constants/notification'; import type { Action, AsyncAction, GetState, Dispatch, RouterLocationState, } from 'flowtype'; -import type { CallbackAction } from '../reducers/NotificationReducer'; +import type { CallbackAction } from 'reducers/NotificationReducer'; export type NotificationAction = { type: typeof NOTIFICATION.ADD, diff --git a/src/js/actions/PendingTxActions.js b/src/js/actions/PendingTxActions.js index ece7c37c..f9ebb839 100644 --- a/src/js/actions/PendingTxActions.js +++ b/src/js/actions/PendingTxActions.js @@ -1,8 +1,8 @@ /* @flow */ -import * as PENDING from './constants/pendingTx'; -import type { State, PendingTx } from '../reducers/PendingTxReducer'; +import * as PENDING from 'actions/constants/pendingTx'; +import type { State, PendingTx } from 'reducers/PendingTxReducer'; export type PendingTxAction = { type: typeof PENDING.FROM_STORAGE, diff --git a/src/js/actions/ReceiveActions.js b/src/js/actions/ReceiveActions.js index 239331b6..62b1b021 100644 --- a/src/js/actions/ReceiveActions.js +++ b/src/js/actions/ReceiveActions.js @@ -2,11 +2,11 @@ import TrezorConnect from 'trezor-connect'; -import * as RECEIVE from './constants/receive'; -import * as NOTIFICATION from './constants/notification'; +import * as RECEIVE from 'actions/constants/receive'; +import * as NOTIFICATION from 'actions/constants/notification'; -import { initialState } from '../reducers/ReceiveReducer'; -import type { State } from '../reducers/ReceiveReducer'; +import { initialState } from 'reducers/ReceiveReducer'; +import type { State } from 'reducers/ReceiveReducer'; import type { TrezorDevice, ThunkAction, AsyncAction, Action, GetState, Dispatch, diff --git a/src/js/actions/SelectedAccountActions.js b/src/js/actions/SelectedAccountActions.js index 5887f901..dd0e3754 100644 --- a/src/js/actions/SelectedAccountActions.js +++ b/src/js/actions/SelectedAccountActions.js @@ -2,16 +2,16 @@ import { LOCATION_CHANGE } from 'react-router-redux'; -import * as ACCOUNT from './constants/account'; -import * as SEND from './constants/send'; -import * as NOTIFICATION from './constants/notification'; -import * as PENDING from './constants/pendingTx'; +import * as ACCOUNT from 'actions/constants/account'; +import * as SEND from 'actions/constants/send'; +import * as NOTIFICATION from 'actions/constants/notification'; +import * as PENDING from 'actions/constants/pendingTx'; import * as SendFormActions from './SendFormActions'; import * as SessionStorageActions from './SessionStorageActions'; -import * as stateUtils from '../reducers/utils'; +import * as stateUtils from 'reducers/utils'; -import { initialState } from '../reducers/SelectedAccountReducer'; +import { initialState } from 'reducers/SelectedAccountReducer'; import type { Coin, diff --git a/src/js/actions/SendFormActions.js b/src/js/actions/SendFormActions.js index 3438312b..5cf443fd 100644 --- a/src/js/actions/SendFormActions.js +++ b/src/js/actions/SendFormActions.js @@ -7,17 +7,17 @@ import EthereumjsTx from 'ethereumjs-tx'; import TrezorConnect from 'trezor-connect'; import { push } from 'react-router-redux'; import BigNumber from 'bignumber.js'; -import { strip } from '../utils/ethUtils'; +import { strip } from 'utils/ethUtils'; import { estimateGas, getGasPrice, pushTx } from './Web3Actions'; import * as SessionStorageActions from './SessionStorageActions'; -import * as NOTIFICATION from './constants/notification'; -import * as SEND from './constants/send'; +import * as NOTIFICATION from 'actions/constants/notification'; +import * as SEND from 'actions/constants/send'; -import { initialState } from '../reducers/SendFormReducer'; -import { findAccount } from '../reducers/AccountsReducer'; -import { findToken } from '../reducers/TokensReducer'; -import { findDevice } from '../reducers/utils'; -import * as stateUtils from '../reducers/utils'; +import { initialState } from 'reducers/SendFormReducer'; +import { findAccount } from 'reducers/AccountsReducer'; +import { findToken } from 'reducers/TokensReducer'; +import { findDevice } from 'reducers/utils'; +import * as stateUtils from 'reducers/utils'; import type { PendingTx, @@ -29,13 +29,13 @@ import type { RouterLocationState, TrezorDevice, } from 'flowtype'; -import type { State as AccountState } from '../reducers/SelectedAccountReducer'; -import type { Web3Instance } from '../reducers/Web3Reducer'; -import type { Config, Coin } from '../reducers/LocalStorageReducer'; -import type { Token } from '../reducers/TokensReducer'; -import type { State, FeeLevel } from '../reducers/SendFormReducer'; -import type { Account } from '../reducers/AccountsReducer'; -import type { Props } from '../components/wallet/account/send'; +import type { State as AccountState } from 'reducers/SelectedAccountReducer'; +import type { Web3Instance } from 'reducers/Web3Reducer'; +import type { Config, Coin } from 'reducers/LocalStorageReducer'; +import type { Token } from 'reducers/TokensReducer'; +import type { State, FeeLevel } from 'reducers/SendFormReducer'; +import type { Account } from 'reducers/AccountsReducer'; +import type { Props } from 'components/wallet/account/send'; export type SendTxAction = { type: typeof SEND.TX_COMPLETE, diff --git a/src/js/actions/SessionStorageActions.js b/src/js/actions/SessionStorageActions.js index 51fcb475..9457aa14 100644 --- a/src/js/actions/SessionStorageActions.js +++ b/src/js/actions/SessionStorageActions.js @@ -1,7 +1,7 @@ /* @flow */ -import type { State as SendFormState } from '../reducers/SendFormReducer'; +import type { State as SendFormState } from 'reducers/SendFormReducer'; import type { ThunkAction, GetState, diff --git a/src/js/actions/SummaryActions.js b/src/js/actions/SummaryActions.js index 203affff..3378be06 100644 --- a/src/js/actions/SummaryActions.js +++ b/src/js/actions/SummaryActions.js @@ -2,16 +2,16 @@ import EthereumjsUtil from 'ethereumjs-util'; -import * as SUMMARY from './constants/summary'; -import * as TOKEN from './constants/token'; -import { resolveAfter } from '../utils/promiseUtils'; -import { initialState } from '../reducers/SummaryReducer'; +import * as SUMMARY from 'actions/constants/summary'; +import * as TOKEN from 'actions/constants/token'; +import { resolveAfter } from 'utils/promiseUtils'; +import { initialState } from 'reducers/SummaryReducer'; import type { ThunkAction, AsyncAction, Action, GetState, Dispatch, } from 'flowtype'; -import type { State } from '../reducers/SummaryReducer'; -import type { Token } from '../reducers/TokensReducer'; +import type { State } from 'reducers/SummaryReducer'; +import type { Token } from 'reducers/TokensReducer'; export type SummaryAction = { type: typeof SUMMARY.INIT, diff --git a/src/js/actions/TokenActions.js b/src/js/actions/TokenActions.js index 296159ae..deceb717 100644 --- a/src/js/actions/TokenActions.js +++ b/src/js/actions/TokenActions.js @@ -1,15 +1,15 @@ /* @flow */ -import * as TOKEN from './constants/token'; +import * as TOKEN from 'actions/constants/token'; import { getTokenInfoAsync, getTokenBalanceAsync } from './Web3Actions'; import type { GetState, AsyncAction, Action, Dispatch, } from 'flowtype'; -import type { State, Token } from '../reducers/TokensReducer'; -import type { Account } from '../reducers/AccountsReducer'; -import type { NetworkToken } from '../reducers/LocalStorageReducer'; +import type { State, Token } from 'reducers/TokensReducer'; +import type { Account } from 'reducers/AccountsReducer'; +import type { NetworkToken } from 'reducers/LocalStorageReducer'; export type TokenAction = { type: typeof TOKEN.FROM_STORAGE, diff --git a/src/js/actions/TrezorConnectActions.js b/src/js/actions/TrezorConnectActions.js index afd6867d..e7d7258f 100644 --- a/src/js/actions/TrezorConnectActions.js +++ b/src/js/actions/TrezorConnectActions.js @@ -4,14 +4,14 @@ import TrezorConnect, { UI, DEVICE, DEVICE_EVENT, UI_EVENT, TRANSPORT_EVENT, } from 'trezor-connect'; -import * as TOKEN from './constants/token'; -import * as CONNECT from './constants/TrezorConnect'; -import * as NOTIFICATION from './constants/notification'; -import * as WALLET from './constants/wallet'; +import * as TOKEN from 'actions/constants/token'; +import * as CONNECT from 'actions/constants/TrezorConnect'; +import * as NOTIFICATION from 'actions/constants/notification'; +import * as WALLET from 'actions/constants/wallet'; import { push } from 'react-router-redux'; import * as DiscoveryActions from './DiscoveryActions'; -import { resolveAfter } from '../utils/promiseUtils'; +import { resolveAfter } from 'utils/promiseUtils'; import type { diff --git a/src/js/actions/WalletActions.js b/src/js/actions/WalletActions.js index e192e68e..3e7e2018 100644 --- a/src/js/actions/WalletActions.js +++ b/src/js/actions/WalletActions.js @@ -2,9 +2,9 @@ import { LOCATION_CHANGE } from 'react-router-redux'; -import * as WALLET from './constants/wallet'; -import * as CONNECT from './constants/TrezorConnect'; -import * as stateUtils from '../reducers/utils'; +import * as WALLET from 'actions/constants/wallet'; +import * as CONNECT from 'actions/constants/TrezorConnect'; +import * as stateUtils from 'reducers/utils'; import type { Device } from 'trezor-connect'; import type diff --git a/src/js/actions/Web3Actions.js b/src/js/actions/Web3Actions.js index 99d50735..c0fa56fc 100644 --- a/src/js/actions/Web3Actions.js +++ b/src/js/actions/Web3Actions.js @@ -10,9 +10,9 @@ import TrezorConnect from 'trezor-connect'; import type { ContractFactory, EstimateGasOptions } from 'web3'; import type BigNumber from 'bignumber.js'; import type { TransactionStatus, TransactionReceipt } from 'web3'; -import { strip } from '../utils/ethUtils'; -import * as WEB3 from './constants/web3'; -import * as PENDING from './constants/pendingTx'; +import { strip } from 'utils/ethUtils'; +import * as WEB3 from 'actions/constants/web3'; +import * as PENDING from 'actions/constants/pendingTx'; import * as AccountsActions from './AccountsActions'; import * as TokenActions from './TokenActions'; @@ -23,11 +23,11 @@ import type { AsyncAction, } from 'flowtype'; -import type { Account } from '../reducers/AccountsReducer'; -import type { PendingTx } from '../reducers/PendingTxReducer'; -import type { Web3Instance } from '../reducers/Web3Reducer'; -import type { Token } from '../reducers/TokensReducer'; -import type { NetworkToken } from '../reducers/LocalStorageReducer'; +import type { Account } from 'reducers/AccountsReducer'; +import type { PendingTx } from 'reducers/PendingTxReducer'; +import type { Web3Instance } from 'reducers/Web3Reducer'; +import type { Token } from 'reducers/TokensReducer'; +import type { NetworkToken } from 'reducers/LocalStorageReducer'; export type Web3Action = { type: typeof WEB3.READY, diff --git a/src/js/index.js b/src/js/index.js index 0f241bdb..bfe8cfb2 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -17,4 +17,4 @@ window.onbeforeunload = () => { store.dispatch(onBeforeUnload()); }; -// Application life cycle starts in ./services/WalletService.js \ No newline at end of file +// Application life cycle starts in services/WalletService.js \ No newline at end of file diff --git a/src/js/reducers/FiatRateReducer.js b/src/js/reducers/FiatRateReducer.js index 160de571..aee1ff80 100644 --- a/src/js/reducers/FiatRateReducer.js +++ b/src/js/reducers/FiatRateReducer.js @@ -1,10 +1,10 @@ /* @flow */ -import { RATE_UPDATE } from '../services/CoinmarketcapService'; +import { RATE_UPDATE } from 'services/CoinmarketcapService'; import type { Action } from 'flowtype'; -import type { FiatRateAction } from '../services/CoinmarketcapService'; +import type { FiatRateAction } from 'services/CoinmarketcapService'; export type Fiat = { +network: string; diff --git a/src/js/router/index.js b/src/js/router/index.js index 54ddca20..0c4994ae 100644 --- a/src/js/router/index.js +++ b/src/js/router/index.js @@ -7,20 +7,20 @@ import store, { history } from '../store'; import ErrorBoundary from 'support/ErrorBoundary'; -import LandingPageContainer from '../components/landing'; -import WalletContainer from '../components/wallet'; -import BootloaderContainer from '../components/wallet/pages/Bootloader'; -import InitializeContainer from '../components/wallet/pages/Initialize'; -import AcquireContainer from '../components/wallet/pages/Acquire'; -import UnreadableDeviceContainer from '../components/wallet/pages/UnreadableDevice'; +import LandingPageContainer from 'components/landing'; +import WalletContainer from 'components/wallet'; +import BootloaderContainer from 'components/wallet/pages/Bootloader'; +import InitializeContainer from 'components/wallet/pages/Initialize'; +import AcquireContainer from 'components/wallet/pages/Acquire'; +import UnreadableDeviceContainer from 'components/wallet/pages/UnreadableDevice'; -import DashboardContainer from '../components/wallet/pages/Dashboard'; -import SummaryContainer from '../components/wallet/account/summary'; -import SendFormContainer from '../components/wallet/account/send'; -import ReceiveContainer from '../components/wallet/account/receive'; -import SignVerifyContainer from '../components/wallet/account/sign/SignVerify'; -import DeviceSettingsContainer from '../components/wallet/pages/DeviceSettings'; -import WalletSettingsContainer from '../components/wallet/pages/WalletSettings'; +import DashboardContainer from 'components/wallet/pages/Dashboard'; +import SummaryContainer from 'components/wallet/account/summary'; +import SendFormContainer from 'components/wallet/account/send'; +import ReceiveContainer from 'components/wallet/account/receive'; +import SignVerifyContainer from 'components/wallet/account/sign/SignVerify'; +import DeviceSettingsContainer from 'components/wallet/pages/DeviceSettings'; +import WalletSettingsContainer from 'components/wallet/pages/WalletSettings'; const App = () => ( diff --git a/src/js/services/CoinmarketcapService.js b/src/js/services/CoinmarketcapService.js index f4c5466b..d2a14d0d 100644 --- a/src/js/services/CoinmarketcapService.js +++ b/src/js/services/CoinmarketcapService.js @@ -1,8 +1,8 @@ /* @flow */ -import { JSONRequest, httpRequest } from '../utils/networkUtils'; -import { resolveAfter } from '../utils/promiseUtils'; +import { JSONRequest, httpRequest } from 'utils/networkUtils'; +import { resolveAfter } from 'utils/promiseUtils'; import { READY } from 'actions/constants/localStorage'; import type { @@ -15,7 +15,7 @@ import type { AsyncAction, GetState, } from 'flowtype'; -import type { Config, FiatValueTicker } from '../reducers/LocalStorageReducer'; +import type { Config, FiatValueTicker } from 'reducers/LocalStorageReducer'; export const RATE_UPDATE: 'rate__update' = 'rate__update'; diff --git a/src/js/services/LocalStorageService.js b/src/js/services/LocalStorageService.js index 831b473f..2435f839 100644 --- a/src/js/services/LocalStorageService.js +++ b/src/js/services/LocalStorageService.js @@ -14,7 +14,7 @@ import * as DISCOVERY from 'actions/constants/discovery'; import * as SEND from 'actions/constants/send'; import * as WEB3 from 'actions/constants/web3'; import * as PENDING from 'actions/constants/pendingTx'; -import { findAccountTokens } from '../reducers/TokensReducer'; +import { findAccountTokens } from 'reducers/TokensReducer'; import type { Middleware, @@ -28,10 +28,10 @@ import type { } from 'flowtype'; import type { TrezorDevice } from 'flowtype'; -import type { Account } from '../reducers/AccountsReducer'; -import type { Token } from '../reducers/TokensReducer'; -import type { PendingTx } from '../reducers/PendingTxReducer'; -import type { Discovery } from '../reducers/DiscoveryReducer'; +import type { Account } from 'reducers/AccountsReducer'; +import type { Token } from 'reducers/TokensReducer'; +import type { PendingTx } from 'reducers/PendingTxReducer'; +import type { Discovery } from 'reducers/DiscoveryReducer'; // https://github.com/STRML/react-localstorage/blob/master/react-localstorage.js diff --git a/src/js/store/index.js b/src/js/store/index.js index 1c5a9ec6..870ceaf3 100644 --- a/src/js/store/index.js +++ b/src/js/store/index.js @@ -8,8 +8,8 @@ import thunk from 'redux-thunk'; // import { useRouterHistory } from 'react-router'; import createHistory from 'history/createHashHistory'; import { createLogger } from 'redux-logger'; -import reducers from '../reducers'; -import services from '../services'; +import reducers from 'reducers'; +import services from 'services'; import Raven from 'raven-js'; import RavenMiddleware from 'redux-raven-middleware';