1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-28 03:08:30 +00:00

allow es6 imports from '~/' as ./src

This commit is contained in:
Szymon Lesisz 2018-05-18 18:38:02 +02:00
parent 8f5c87a02e
commit 661f9fc39c
26 changed files with 69 additions and 69 deletions

View File

@ -5,8 +5,8 @@ import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as LogActions from '../../actions/LogActions';
import type { State, Dispatch } from '../../flowtype';
import * as LogActions from '~/js/actions/LogActions';
import type { State, Dispatch } from '~/js/flowtype';
type Props = {
toggle: typeof LogActions.toggle

View File

@ -5,8 +5,8 @@ import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as LogActions from '../../actions/LogActions';
import type { State, Dispatch } from '../../flowtype';
import * as LogActions from '~/js/actions/LogActions';
import type { State, Dispatch } from '~/js/flowtype';
type Props = {
log: $ElementType<State, 'log'>,

View File

@ -5,9 +5,9 @@ import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as NOTIFICATION from '../../actions/constants/notification';
import * as NotificationActions from '../../actions/NotificationActions';
import type { Action, State, Dispatch } from '../../flowtype';
import * as NOTIFICATION from '~/js/actions/constants/notification';
import * as NotificationActions from '~/js/actions/NotificationActions';
import type { Action, State, Dispatch } from '~/js/flowtype';
type Props = {
notifications: $ElementType<State, 'notifications'>,

View File

@ -4,7 +4,7 @@
import React, { Component } from 'react';
import TrezorConnect from 'trezor-connect';
import type { State, TrezorDevice } from '../../flowtype';
import type { State, TrezorDevice } from '~/js/flowtype';
type Props = {
transport: $PropertyType<$ElementType<State, 'connect'>, 'transport'>;

View File

@ -8,7 +8,7 @@ import { connect } from 'react-redux';
import LandingPage from './LandingPage';
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
import type { State, Dispatch } from '../../flowtype';
import type { State, Dispatch } from '~/js/flowtype';
export type StateProps = {
localStorage: $ElementType<State, 'localStorage'>,

View File

@ -2,8 +2,8 @@
'use strict';
import React, { Component } from 'react';
import { findAccount } from '../../reducers/AccountsReducer';
import { findSelectedDevice } from '../../reducers/TrezorConnectReducer';
import { findAccount } from '~/js/reducers/AccountsReducer';
import { findSelectedDevice } from '~/js/reducers/TrezorConnectReducer';
import type { Props } from './index';

View File

@ -2,7 +2,7 @@
'use strict';
import React, { Component } from 'react';
import { getNewInstance } from '../../reducers/TrezorConnectReducer'
import { getNewInstance } from '~/js/reducers/TrezorConnectReducer'
import type { Props } from './index';
type State = {

View File

@ -3,7 +3,7 @@
import React, { Component } from 'react';
import raf from 'raf';
import { findSelectedDevice } from '../../reducers/TrezorConnectReducer';
import { findSelectedDevice } from '~/js/reducers/TrezorConnectReducer';
import type { Props } from './index';
type State = {

View File

@ -10,8 +10,8 @@ import { CSSTransition, Transition } from 'react-transition-group';
import { UI } from 'trezor-connect';
import { default as ModalActions } from '../../actions/ModalActions';
import { default as ReceiveActions } from '../../actions/ReceiveActions';
import { default as ModalActions } from '~/js/actions/ModalActions';
import { default as ReceiveActions } from '~/js/actions/ReceiveActions';
import Pin from './Pin';
import InvalidPin from './InvalidPin';
@ -22,12 +22,12 @@ import ConfirmAddress, { ConfirmUnverifiedAddress } from './ConfirmAddress';
import RememberDevice, { ForgetDevice } from './RememberDevice';
import DuplicateDevice from './DuplicateDevice';
import * as RECEIVE from '../../actions/constants/receive';
import * as MODAL from '../../actions/constants/modal';
import * as CONNECT from '../../actions/constants/TrezorConnect';
import * as RECEIVE from '~/js/actions/constants/receive';
import * as MODAL from '~/js/actions/constants/modal';
import * as CONNECT from '~/js/actions/constants/TrezorConnect';
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
import type { State, Dispatch } from '../../flowtype';
import type { State, Dispatch } from '~/js/flowtype';
type OwnProps = { }

View File

@ -2,15 +2,15 @@
'use strict';
import React, { Component } from 'react';
import { Notification } from '../../common/Notification';
import { findDevice } from '../../../reducers/TrezorConnectReducer';
import { Notification } from '~/js/common/Notification';
import { findDevice } from '~/js/reducers/TrezorConnectReducer';
// import * as AbstractAccountActions from '../../actions/AbstractAccountActions';
import { default as AbstractAccountActions } from '../../../actions/AbstractAccountActions';
// import * as AbstractAccountActions from '~/js/actions/AbstractAccountActions';
import { default as AbstractAccountActions } from '~/js/actions/AbstractAccountActions';
import type { State, TrezorDevice, Action, ThunkAction } from '../../../flowtype';
import type { Account } from '../../../reducers/AccountsReducer';
import type { Discovery } from '../../../reducers/DiscoveryReducer';
import type { State, TrezorDevice, Action, ThunkAction } from '~/js/flowtype';
import type { Account } from '~/js/reducers/AccountsReducer';
import type { Discovery } from '~/js/reducers/DiscoveryReducer';
export type StateProps = {
abstractAccount: $ElementType<State, 'abstractAccount'>,

View File

@ -7,7 +7,7 @@ import Tooltip from 'rc-tooltip';
import { QRCode } from 'react-qr-svg';
import AbstractAccount from '../AbstractAccount';
import { Notification } from '../../../common/Notification';
import { Notification } from '~/js/common/Notification';
import type { AccountState } from '../AbstractAccount';
import type { Props } from './index';

View File

@ -5,13 +5,13 @@ import React, { Component, PropTypes } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { default as ReceiveActions } from '../../../../actions/ReceiveActions';
import { default as AbstractAccountActions } from '../../../../actions/AbstractAccountActions';
import * as TokenActions from '../../../../actions/TokenActions';
import { default as ReceiveActions } from '~/js/actions/ReceiveActions';
import { default as AbstractAccountActions } from '~/js/actions/AbstractAccountActions';
import * as TokenActions from '~/js/actions/TokenActions';
import Receive from './Receive';
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
import type { State, Dispatch } from '../../../../flowtype';
import type { State, Dispatch } from '~/js/flowtype';
import type {
StateProps as BaseStateProps,
DispatchProps as BaseDispatchProps

View File

@ -5,11 +5,11 @@ import React from 'react';
import ColorHash from 'color-hash';
import ScaleText from 'react-scale-text';
import { findAccountTokens } from '../../../../reducers/TokensReducer';
import { findAccountTokens } from '~/js/reducers/TokensReducer';
import type { Coin } from '../../../../reducers/LocalStorageReducer';
import type { Account } from '../../../../reducers/AccountsReducer';
import type { Token } from '../../../../reducers/TokensReducer';
import type { Coin } from '~/js/reducers/LocalStorageReducer';
import type { Account } from '~/js/reducers/AccountsReducer';
import type { Token } from '~/js/reducers/TokensReducer';
import type { Props as BaseProps } from './index';
type Props = {

View File

@ -6,9 +6,9 @@ import Select from 'react-select';
import AdvancedForm from './AdvancedForm';
import PendingTransactions from './PendingTransactions';
import { FeeSelectValue, FeeSelectOption } from './FeeSelect';
import { Notification } from '../../../common/Notification';
import { Notification } from '~/js/common/Notification';
import AbstractAccount from '../AbstractAccount';
import { findAccountTokens } from '../../../../reducers/TokensReducer';
import { findAccountTokens } from '~/js/reducers/TokensReducer';
import type { Props } from './index';
import type { AccountState } from '../AbstractAccount';

View File

@ -5,12 +5,12 @@ import * as React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { default as SendFormActions } from '../../../../actions/SendFormActions';
import { default as AbstractAccountActions } from '../../../../actions/AbstractAccountActions';
import { default as SendFormActions } from '~/js/actions/SendFormActions';
import { default as AbstractAccountActions } from '~/js/actions/AbstractAccountActions';
import SendForm from './SendForm';
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
import type { State, Dispatch } from '../../../../flowtype';
import type { State, Dispatch } from '~/js/flowtype';
import type { StateProps as BaseStateProps, DispatchProps as BaseDispatchProps } from '../AbstractAccount';
type OwnProps = { }

View File

@ -6,20 +6,20 @@ import BigNumber from 'bignumber.js';
import { Async } from 'react-select';
import Tooltip from 'rc-tooltip';
import { resolveAfter } from '../../../../utils/promiseUtils';
import { resolveAfter } from '~/js/utils/promiseUtils';
import AbstractAccount from '../AbstractAccount';
import { Notification } from '../../../common/Notification';
import { Notification } from '~/js/common/Notification';
import SummaryDetails from './SummaryDetails.js';
import SummaryTokens from './SummaryTokens.js';
import type { Props } from './index';
import type { AccountState } from '../AbstractAccount';
import type { TrezorDevice } from '../../../../flowtype';
import type { NetworkToken } from '../../../../reducers/LocalStorageReducer';
import type { Account } from '../../../../reducers/AccountsReducer';
import type { Discovery } from '../../../../reducers/DiscoveryReducer';
import { findAccountTokens } from '../../../../reducers/TokensReducer';
import type { TrezorDevice } from '~/js/flowtype';
import type { NetworkToken } from '~/js/reducers/LocalStorageReducer';
import type { Account } from '~/js/reducers/AccountsReducer';
import type { Discovery } from '~/js/reducers/DiscoveryReducer';
import { findAccountTokens } from '~/js/reducers/TokensReducer';
export default class Summary extends AbstractAccount<Props> {
render() {

View File

@ -5,7 +5,7 @@ import React from 'react';
import BigNumber from 'bignumber.js';
import type { Props as BaseProps } from './index';
import type { Coin } from '../../../../reducers/LocalStorageReducer';
import type { Coin } from '~/js/reducers/LocalStorageReducer';
type Props = {
// coin: $PropertyType<$ElementType<BaseProps, 'abstractAccount'>, 'coin'>,

View File

@ -6,12 +6,12 @@ import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Summary from './Summary';
import { default as AbstractAccountActions } from '../../../../actions/AbstractAccountActions';
import * as SummaryActions from '../../../../actions/SummaryActions';
import * as TokenActions from '../../../../actions/TokenActions';
import { default as AbstractAccountActions } from '~/js/actions/AbstractAccountActions';
import * as SummaryActions from '~/js/actions/SummaryActions';
import * as TokenActions from '~/js/actions/TokenActions';
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
import type { State, Dispatch } from '../../../../flowtype';
import type { State, Dispatch } from '~/js/flowtype';
import type { StateProps as BaseStateProps, DispatchProps as BaseDispatchProps } from '../AbstractAccount';
type OwnProps = { }

View File

@ -5,13 +5,13 @@ import React, { PureComponent } from 'react';
import { Link, NavLink } from 'react-router-dom';
import BigNumber from 'bignumber.js';
import { findDeviceAccounts } from '../../../reducers/AccountsReducer';
import { findSelectedDevice } from '../../../reducers/TrezorConnectReducer';
import Loader from '../../common/LoaderCircle';
import { findDeviceAccounts } from '~/js/reducers/AccountsReducer';
import { findSelectedDevice } from '~/js/reducers/TrezorConnectReducer';
import Loader from '~/js/common/LoaderCircle';
import Tooltip from 'rc-tooltip';
import type { Props } from './index';
import type { TrezorDevice } from '../../../flowtype';
import type { TrezorDevice } from '~/js/flowtype';
const AccountSelection = (props: Props): ?React$Element<string> => {

View File

@ -10,10 +10,10 @@ import { DeviceSelect, DeviceDropdown } from './DeviceSelection';
import AccountSelection from './AccountSelection';
import CoinSelection from './CoinSelection';
import StickyContainer from './StickyContainer';
import { findSelectedDevice } from '../../../reducers/TrezorConnectReducer';
import { findSelectedDevice } from '~/js/reducers/TrezorConnectReducer';
import type { Props } from './index';
import type { TrezorDevice } from '../../../flowtype';
import type { TrezorDevice } from '~/js/flowtype';
type TransitionMenuProps = {

View File

@ -5,7 +5,7 @@ import React from 'react';
import { Link, NavLink } from 'react-router-dom';
import type { Props } from './index';
import type { TrezorDevice } from '../../../flowtype';
import type { TrezorDevice } from '~/js/flowtype';
const CoinSelection = (props: Props): React$Element<string> => {
const { location } = props.router;

View File

@ -5,10 +5,10 @@ import React, { Component } from 'react';
import Select from 'react-select';
import TrezorConnect from 'trezor-connect';
import { findSelectedDevice } from '../../../reducers/TrezorConnectReducer';
import { findSelectedDevice } from '~/js/reducers/TrezorConnectReducer';
import type { Props } from './index';
import type { TrezorDevice } from '../../../flowtype';
import type { TrezorDevice } from '~/js/flowtype';
export const DeviceSelect = (props: Props) => {

View File

@ -5,7 +5,7 @@
import * as React from 'react';
import raf from 'raf';
import { getViewportHeight, getScrollY } from '../../../utils/windowUtils';
import { getViewportHeight, getScrollY } from '~/js/utils/windowUtils';
type Props = {
location: string,

View File

@ -6,13 +6,13 @@ import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import * as TrezorConnectActions from '../../../actions/TrezorConnectActions';
import { toggleDeviceDropdown } from '../../../actions/WalletActions';
import * as TrezorConnectActions from '~/js/actions/TrezorConnectActions';
import { toggleDeviceDropdown } from '~/js/actions/WalletActions';
import Aside from './Aside';
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
import type { State, Dispatch } from '../../../flowtype';
import type { State, Dispatch } from '~/js/flowtype';
type OwnProps = {

View File

@ -16,7 +16,7 @@ import Notifications from '../common/Notification';
import Log from '../common/Log';
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
import type { State, Dispatch } from '../../flowtype';
import type { State, Dispatch } from '~/js/flowtype';
type WalletContainerProps = {
wallet: $ElementType<State, 'wallet'>,

View File

@ -4,10 +4,10 @@
import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { Notification } from '../../common/Notification';
import * as TrezorConnectActions from '../../../actions/TrezorConnectActions';
import { Notification } from '~/js/common/Notification';
import * as TrezorConnectActions from '~/js/actions/TrezorConnectActions';
import type { State, Dispatch } from '../../../flowtype';
import type { State, Dispatch } from '~/js/flowtype';
type Props = {
connect: $ElementType<State, 'connect'>,
acquireDevice: typeof TrezorConnectActions.acquire