flowtype moved level up. to ./src directory

pull/2/merge
Szymon Lesisz 6 years ago
parent a0f6538126
commit be0c936517

@ -10,16 +10,17 @@
.*/src/solidity/.*
[libs]
./src/js/flowtype/redux_v3.x.x.js
./src/js/flowtype/react-redux_v5.x.x.js
./src/js/flowtype/react-router_v4.x.x.js
./src/js/flowtype/react-router-dom_v4.x.x.js
./src/js/flowtype/react-router-redux.js
./src/js/flowtype/css.js
./src/js/flowtype/trezor-connect.js
./src/js/flowtype/bignumber.js
./src/js/flowtype/ethereum-types.js
./src/js/flowtype/web3.js
./src/flowtype/npm/redux_v3.x.x.js
./src/flowtype/npm/react-redux_v5.x.x.js
./src/flowtype/npm/react-router_v4.x.x.js
./src/flowtype/npm/react-router-dom_v4.x.x.js
./src/flowtype/npm/react-router-redux.js
./src/flowtype/npm/bignumber.js
./src/flowtype/npm/ethereum-types.js
./src/flowtype/npm/web3.js
./src/flowtype/css.js
./src/flowtype/trezor-connect.js
[options]

@ -12,25 +12,25 @@ import type {
PlainDispatch as ReduxPlainDispatch
} from 'redux';
import type { Reducers, ReducersState } from '../reducers';
import type { Reducers, ReducersState } from '~/js/reducers';
// Actions
import type { AbstractAccountAction } from '../actions/AbstractAccountActions';
import type { AccountAction } from '../actions/AccountsActions';
import type { DiscoveryAction } from '../actions/DiscoveryActions';
import type { StorageAction } from '../actions/LocalStorageActions';
import type { LogAction } from '../actions/LogActions';
import type { ModalAction } from '../actions/ModalActions';
import type { NotificationAction } from '../actions/NotificationActions';
import type { PendingTxAction } from '../actions/PendingTxActions';
import type { ReceiveAction } from '../actions/ReceiveActions';
import type { SendFormAction } from '../actions/SendFormActions';
import type { SummaryAction } from '../actions/SummaryActions';
import type { TokenAction } from '../actions/TokenActions';
import type { TrezorConnectAction } from '../actions/TrezorConnectActions';
import type { WalletAction } from '../actions/WalletActions';
import type { Web3Action } from '../actions/Web3Actions';
import type { FiatRateAction } from '../services/CoinmarketcapService'; // this service has no action file, all is written inside one file
import type { AbstractAccountAction } from '~/js/actions/AbstractAccountActions';
import type { AccountAction } from '~/js/actions/AccountsActions';
import type { DiscoveryAction } from '~/js/actions/DiscoveryActions';
import type { StorageAction } from '~/js/actions/LocalStorageActions';
import type { LogAction } from '~/js/actions/LogActions';
import type { ModalAction } from '~/js/actions/ModalActions';
import type { NotificationAction } from '~/js/actions/NotificationActions';
import type { PendingTxAction } from '~/js/actions/PendingTxActions';
import type { ReceiveAction } from '~/js/actions/ReceiveActions';
import type { SendFormAction } from '~/js/actions/SendFormActions';
import type { SummaryAction } from '~/js/actions/SummaryActions';
import type { TokenAction } from '~/js/actions/TokenActions';
import type { TrezorConnectAction } from '~/js/actions/TrezorConnectActions';
import type { WalletAction } from '~/js/actions/WalletActions';
import type { Web3Action } from '~/js/actions/Web3Actions';
import type { FiatRateAction } from '~/js/services/CoinmarketcapService'; // this service has no action file, all is written inside one file
import type {
Device,

@ -6,7 +6,7 @@ import * as ACCOUNT from './constants/account';
import { initialState } from '../reducers/AbstractAccountReducer';
import { findSelectedDevice } from '../reducers/TrezorConnectReducer';
import type { AsyncAction, ThunkAction, Action, GetState, Dispatch, TrezorDevice } from '../flowtype';
import type { AsyncAction, ThunkAction, Action, GetState, Dispatch, TrezorDevice } from '~/flowtype';
import type { State } from '../reducers/AbstractAccountReducer';
import type { Coin } from '../reducers/LocalStorageReducer';

@ -2,7 +2,7 @@
'use strict';
import * as ACCOUNT from './constants/account';
import type { Action, TrezorDevice } from '../flowtype';
import type { Action, TrezorDevice } from '~/flowtype';
import type { State } from '../reducers/AccountsReducer';
export type AccountAction =

@ -14,7 +14,7 @@ import EthereumjsUtil from 'ethereumjs-util';
import { getNonceAsync, getBalanceAsync, getTokenBalanceAsync } from './Web3Actions';
import { setBalance as setTokenBalance } from './TokenActions';
import type { ThunkAction, AsyncAction, Action, GetState, Dispatch, TrezorDevice } from '../flowtype';
import type { ThunkAction, AsyncAction, Action, GetState, Dispatch, TrezorDevice } from '~/flowtype';
import type { Discovery, State } from '../reducers/DiscoveryReducer';
export type DiscoveryAction = {

@ -9,7 +9,7 @@ import * as STORAGE from './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 { ThunkAction, AsyncAction, GetState, Dispatch, TrezorDevice } from '~/flowtype';
import type { Config, Coin, TokensCollection } from '../reducers/LocalStorageReducer';
import AppConfigJSON from '~/data/appConfig.json';

@ -3,7 +3,7 @@
import * as LOG from './constants/log';
import type { Action, ThunkAction, GetState, Dispatch } from '../flowtype';
import type { Action, ThunkAction, GetState, Dispatch } from '~/flowtype';
import type { LogEntry } from '../reducers/LogReducer';
export type LogAction = {

@ -5,7 +5,7 @@ import TrezorConnect, { UI, UI_EVENT } from 'trezor-connect';
import * as MODAL from './constants/modal';
import * as CONNECT from './constants/TrezorConnect';
import type { ThunkAction, AsyncAction, Action, GetState, Dispatch, TrezorDevice } from '../flowtype';
import type { ThunkAction, AsyncAction, Action, GetState, Dispatch, TrezorDevice } from '~/flowtype';
import type { State } from '../reducers/ModalReducer';
export type ModalAction = {

@ -3,7 +3,7 @@
import * as NOTIFICATION from './constants/notification';
import type { Action, AsyncAction, GetState, Dispatch, RouterLocationState } from '../flowtype';
import type { Action, AsyncAction, GetState, Dispatch, RouterLocationState } from '~/flowtype';
import type { CallbackAction } from '../reducers/NotificationReducer';
export type NotificationAction = {

@ -9,7 +9,7 @@ import { initialState } from '../reducers/ReceiveReducer';
import type { State } from '../reducers/ReceiveReducer';
import { findSelectedDevice } from '../reducers/TrezorConnectReducer';
import type { TrezorDevice, ThunkAction, AsyncAction, Action, GetState, Dispatch } from '../flowtype';
import type { TrezorDevice, ThunkAction, AsyncAction, Action, GetState, Dispatch } from '~/flowtype';
export type ReceiveAction = {
type: typeof RECEIVE.INIT,

@ -27,7 +27,7 @@ import type {
AsyncAction,
RouterLocationState,
TrezorDevice
} from '../flowtype';
} from '~/flowtype';
import type { State as AccountState } from '../reducers/AbstractAccountReducer';
import type { Web3Instance } from '../reducers/Web3Reducer';
import type { Config, Coin } from '../reducers/LocalStorageReducer';

@ -8,7 +8,7 @@ import { resolveAfter } from '../utils/promiseUtils';
import { initialState } from '../reducers/SummaryReducer';
import { findSelectedDevice } from '../reducers/TrezorConnectReducer';
import type { ThunkAction, AsyncAction, Action, GetState, Dispatch } from '../flowtype';
import type { ThunkAction, AsyncAction, Action, GetState, Dispatch } from '~/flowtype';
import type { State } from '../reducers/SummaryReducer';
import type { Token } from '../reducers/TokensReducer';

@ -4,7 +4,7 @@
import * as TOKEN from './constants/token';
import { getTokenInfoAsync, getTokenBalanceAsync } from './Web3Actions';
import type { GetState, AsyncAction, Action, Dispatch } from '../flowtype';
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';

@ -32,7 +32,7 @@ import type {
AsyncAction,
TrezorDevice,
RouterLocationState
} from '../flowtype';
} from '~/flowtype';
export type TrezorConnectAction = {

@ -3,7 +3,7 @@
import * as WALLET from './constants/wallet';
import type { RouterLocationState, ThunkAction, Dispatch, GetState } from '../flowtype';
import type { RouterLocationState, ThunkAction, Dispatch, GetState } from '~/flowtype';
export type WalletAction = {
type: typeof WALLET.SET_INITIAL_URL,

@ -18,7 +18,7 @@ import type {
GetState,
Action,
AsyncAction,
} from '../flowtype';
} from '~/flowtype';
import type { ContractFactory, EstimateGasOptions } from 'web3';
import type BigNumber from 'bignumber.js';

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

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

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

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

@ -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 '~/js/flowtype';
import type { State, Dispatch } from '~/flowtype';
export type StateProps = {
localStorage: $ElementType<State, 'localStorage'>,

@ -27,7 +27,7 @@ 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 '~/js/flowtype';
import type { State, Dispatch } from '~/flowtype';
type OwnProps = { }

@ -8,7 +8,7 @@ import { findDevice } from '~/js/reducers/TrezorConnectReducer';
// import * as AbstractAccountActions from '~/js/actions/AbstractAccountActions';
import { default as AbstractAccountActions } from '~/js/actions/AbstractAccountActions';
import type { State, TrezorDevice, Action, ThunkAction } from '~/js/flowtype';
import type { State, TrezorDevice, Action, ThunkAction } from '~/flowtype';
import type { Account } from '~/js/reducers/AccountsReducer';
import type { Discovery } from '~/js/reducers/DiscoveryReducer';

@ -11,7 +11,7 @@ import * as TokenActions from '~/js/actions/TokenActions';
import Receive from './Receive';
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
import type { State, Dispatch } from '~/js/flowtype';
import type { State, Dispatch } from '~/flowtype';
import type {
StateProps as BaseStateProps,
DispatchProps as BaseDispatchProps

@ -10,7 +10,7 @@ import { default as AbstractAccountActions } from '~/js/actions/AbstractAccountA
import SendForm from './SendForm';
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
import type { State, Dispatch } from '~/js/flowtype';
import type { State, Dispatch } from '~/flowtype';
import type { StateProps as BaseStateProps, DispatchProps as BaseDispatchProps } from '../AbstractAccount';
type OwnProps = { }

@ -15,7 +15,7 @@ import SummaryTokens from './SummaryTokens.js';
import type { Props } from './index';
import type { AccountState } from '../AbstractAccount';
import type { TrezorDevice } from '~/js/flowtype';
import type { TrezorDevice } from '~/flowtype';
import type { NetworkToken } from '~/js/reducers/LocalStorageReducer';
import type { Account } from '~/js/reducers/AccountsReducer';
import type { Discovery } from '~/js/reducers/DiscoveryReducer';

@ -11,7 +11,7 @@ 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 '~/js/flowtype';
import type { State, Dispatch } from '~/flowtype';
import type { StateProps as BaseStateProps, DispatchProps as BaseDispatchProps } from '../AbstractAccount';
type OwnProps = { }

@ -11,7 +11,7 @@ import Loader from '~/js/components/common/LoaderCircle';
import Tooltip from 'rc-tooltip';
import type { Props } from './index';
import type { TrezorDevice } from '~/js/flowtype';
import type { TrezorDevice } from '~/flowtype';
const AccountSelection = (props: Props): ?React$Element<string> => {

@ -13,7 +13,7 @@ import StickyContainer from './StickyContainer';
import { findSelectedDevice } from '~/js/reducers/TrezorConnectReducer';
import type { Props } from './index';
import type { TrezorDevice } from '~/js/flowtype';
import type { TrezorDevice } from '~/flowtype';
type TransitionMenuProps = {

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

@ -8,7 +8,7 @@ import TrezorConnect from 'trezor-connect';
import { findSelectedDevice } from '~/js/reducers/TrezorConnectReducer';
import type { Props } from './index';
import type { TrezorDevice } from '~/js/flowtype';
import type { TrezorDevice } from '~/flowtype';
export const DeviceSelect = (props: Props) => {

@ -12,7 +12,7 @@ import { toggleDeviceDropdown } from '~/js/actions/WalletActions';
import Aside from './Aside';
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
import type { State, Dispatch } from '~/js/flowtype';
import type { State, Dispatch } from '~/flowtype';
type OwnProps = {

@ -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 '~/js/flowtype';
import type { State, Dispatch } from '~/flowtype';
type WalletContainerProps = {
wallet: $ElementType<State, 'wallet'>,

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

@ -4,7 +4,7 @@
import * as ACCOUNT from '../actions/constants/account';
import * as CONNECT from '../actions/constants/TrezorConnect';
import type { Action } from '../flowtype';
import type { Action } from '~/flowtype';
import type { Coin } from './LocalStorageReducer';
export type State = {

@ -4,7 +4,7 @@
import * as CONNECT from '../actions/constants/TrezorConnect';
import * as ACCOUNT from '../actions/constants/account';
import type { Action, TrezorDevice } from '../flowtype';
import type { Action, TrezorDevice } from '~/flowtype';
import type {
AccountCreateAction,
AccountSetBalanceAction,

@ -7,7 +7,7 @@ import * as DISCOVERY from '../actions/constants/discovery';
import * as ACCOUNT from '../actions/constants/account';
import * as CONNECT from '../actions/constants/TrezorConnect';
import type { Action, TrezorDevice } from '../flowtype';
import type { Action, TrezorDevice } from '~/flowtype';
import type {
DiscoveryStartAction,
DiscoveryWaitingAction,

@ -3,7 +3,7 @@
import { RATE_UPDATE } from '../services/CoinmarketcapService';
import type { Action } from '../flowtype';
import type { Action } from '~/flowtype';
import type { FiatRateAction } from '../services/CoinmarketcapService';
export type Fiat = {

@ -3,7 +3,7 @@
import * as STORAGE from '../actions/constants/localStorage';
import type { Action } from '../flowtype';
import type { Action } from '~/flowtype';
export type Coin = {
name: string;

@ -2,7 +2,7 @@
'use strict';
import * as LOG from '../actions/constants/log';
import type { Action } from '../flowtype';
import type { Action } from '~/flowtype';
export type LogEntry = {
time: number;

@ -6,7 +6,7 @@ import * as RECEIVE from '../actions/constants/receive';
import * as MODAL from '../actions/constants/modal';
import * as CONNECT from '../actions/constants/TrezorConnect';
import type { Action, TrezorDevice } from '../flowtype';
import type { Action, TrezorDevice } from '~/flowtype';
export type State = {
opened: false;

@ -5,7 +5,7 @@ import { LOCATION_CHANGE } from 'react-router-redux';
import * as NOTIFICATION from '../actions/constants/notification';
import { DEVICE } from 'trezor-connect';
import type { Action } from '../flowtype';
import type { Action } from '~/flowtype';
export type CallbackAction = {
label: string;

@ -5,7 +5,7 @@ import * as PENDING from '../actions/constants/pendingTx';
import * as SEND from '../actions/constants/send';
import * as WEB3 from '../actions/constants/web3';
import type { Action } from '../flowtype';
import type { Action } from '~/flowtype';
import type { SendTxAction } from '../actions/SendFormActions';
export type PendingTx = {

@ -2,7 +2,7 @@
'use strict';
import * as RECEIVE from '../actions/constants/receive';
import type { Action } from '../flowtype';
import type { Action } from '~/flowtype';
export type State = {
addressVerified: boolean;

@ -8,7 +8,7 @@ import EthereumjsUnits from 'ethereumjs-units';
import BigNumber from 'bignumber.js';
import { getFeeLevels } from '../actions/SendFormActions';
import type { Action } from '../flowtype';
import type { Action } from '~/flowtype';
import type {
Web3CreateAction,
Web3UpdateBlockAction,

@ -2,7 +2,7 @@
'use strict';
import * as SUMMARY from '../actions/constants/summary';
import type { Action } from '../flowtype';
import type { Action } from '~/flowtype';
import type { NetworkToken } from './LocalStorageReducer';
export type State = {

@ -4,7 +4,7 @@
import * as CONNECT from '../actions/constants/TrezorConnect';
import * as TOKEN from '../actions/constants/token';
import type { Action, TrezorDevice } from '../flowtype';
import type { Action, TrezorDevice } from '~/flowtype';
import type { Account } from './AccountsReducer';
export type Token = {

@ -4,7 +4,7 @@
import { TRANSPORT, DEVICE } from 'trezor-connect';
import * as CONNECT from '../actions/constants/TrezorConnect';
import type { Action, TrezorDevice } from '../flowtype';
import type { Action, TrezorDevice } from '~/flowtype';
import type { Device } from 'trezor-connect';
export type SelectedDevice = {

@ -9,7 +9,7 @@ import * as WALLET from '../actions/constants/wallet';
import * as CONNECT from '../actions/constants/TrezorConnect';
import type { Action, RouterLocationState, TrezorDevice } from '../flowtype';
import type { Action, RouterLocationState, TrezorDevice } from '~/flowtype';
type State = {
ready: boolean;

@ -6,7 +6,7 @@ import Web3 from 'web3';
import * as STORAGE from '../actions/constants/localStorage';
import * as WEB3 from '../actions/constants/web3';
import type { Action } from '../flowtype';
import type { Action } from '~/flowtype';
import type {
Web3CreateAction,
Web3UpdateBlockAction,

@ -14,7 +14,7 @@ import type {
Action,
AsyncAction,
GetState
} from '../flowtype';
} from '~/flowtype';
import type { Config, FiatValueTicker } from '../reducers/LocalStorageReducer';
export const RATE_UPDATE: 'rate__update' = 'rate__update';

@ -25,9 +25,9 @@ import type {
Action,
AsyncAction,
GetState
} from '../flowtype';
} from '~/flowtype';
import type { TrezorDevice } 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';

@ -15,7 +15,7 @@ import type {
Action,
AsyncAction,
GetState
} from '../flowtype';
} from '~/flowtype';
const exclude: Array<string> = [
ADD, OPEN, CLOSE,

@ -19,7 +19,7 @@ import type {
GetState,
RouterLocationState,
TrezorDevice
} from '../flowtype';
} from '~/flowtype';
/**
* Middleware used for init application and managing router path.

@ -25,9 +25,9 @@ import type {
Action,
AsyncAction,
GetState
} from '../flowtype';
} from '~/flowtype';
import type { TrezorDevice } 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';

@ -24,7 +24,7 @@ import type {
AsyncAction,
GetState,
RouterLocationState
} from '../flowtype';
} from '~/flowtype';
const TrezorConnectService: Middleware = (api: MiddlewareAPI) => (next: MiddlewareDispatch) => (action: Action): Action => {

@ -14,7 +14,7 @@ import services from '../services';
import Raven from 'raven-js';
import RavenMiddleware from 'redux-raven-middleware';
import type { Action, GetState, Store } from '../flowtype';
import type { Action, GetState, Store } from '~/flowtype';
export const history: History = createHistory( { queryKey: false } );

Loading…
Cancel
Save