mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-02 20:30:54 +00:00
change imports
This commit is contained in:
parent
eafd541477
commit
e64b44d632
@ -2,7 +2,7 @@
|
|||||||
import * as storageUtils from 'utils/storage';
|
import * as storageUtils from 'utils/storage';
|
||||||
import { findToken } from 'reducers/TokensReducer';
|
import { findToken } from 'reducers/TokensReducer';
|
||||||
|
|
||||||
import type { State as SendFormState } from 'reducers/SendFormReducer';
|
import type { State as SendFormState } from 'reducers/SendFormEthereumReducer';
|
||||||
import type {
|
import type {
|
||||||
ThunkAction,
|
ThunkAction,
|
||||||
PayloadAction,
|
PayloadAction,
|
||||||
@ -20,7 +20,7 @@ const getTxDraftKey = (getState: GetState): string => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const saveDraftTransaction = (): ThunkAction => (dispatch: Dispatch, getState: GetState): void => {
|
export const saveDraftTransaction = (): ThunkAction => (dispatch: Dispatch, getState: GetState): void => {
|
||||||
const state = getState().sendForm;
|
const state = getState().sendFormEthereum;
|
||||||
if (state.untouched) return;
|
if (state.untouched) return;
|
||||||
|
|
||||||
const key = getTxDraftKey(getState);
|
const key = getTxDraftKey(getState);
|
||||||
|
@ -19,7 +19,7 @@ type StateProps = {
|
|||||||
devices: $ElementType<State, 'devices'>,
|
devices: $ElementType<State, 'devices'>,
|
||||||
connect: $ElementType<State, 'connect'>,
|
connect: $ElementType<State, 'connect'>,
|
||||||
selectedAccount: $ElementType<State, 'selectedAccount'>,
|
selectedAccount: $ElementType<State, 'selectedAccount'>,
|
||||||
sendForm: $ElementType<State, 'sendForm'>,
|
sendForm: $ElementType<State, 'sendFormEthereum'>,
|
||||||
receive: $ElementType<State, 'receive'>,
|
receive: $ElementType<State, 'receive'>,
|
||||||
localStorage: $ElementType<State, 'localStorage'>,
|
localStorage: $ElementType<State, 'localStorage'>,
|
||||||
wallet: $ElementType<State, 'wallet'>,
|
wallet: $ElementType<State, 'wallet'>,
|
||||||
@ -38,7 +38,7 @@ const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (state: St
|
|||||||
devices: state.devices,
|
devices: state.devices,
|
||||||
connect: state.connect,
|
connect: state.connect,
|
||||||
selectedAccount: state.selectedAccount,
|
selectedAccount: state.selectedAccount,
|
||||||
sendForm: state.sendForm,
|
sendForm: state.sendFormEthereum,
|
||||||
receive: state.receive,
|
receive: state.receive,
|
||||||
localStorage: state.localStorage,
|
localStorage: state.localStorage,
|
||||||
wallet: state.wallet,
|
wallet: state.wallet,
|
||||||
|
@ -9,7 +9,7 @@ import * as NotificationActions from 'actions/NotificationActions';
|
|||||||
import * as LocalStorageActions from 'actions/LocalStorageActions';
|
import * as LocalStorageActions from 'actions/LocalStorageActions';
|
||||||
import * as TrezorConnectActions from 'actions/TrezorConnectActions';
|
import * as TrezorConnectActions from 'actions/TrezorConnectActions';
|
||||||
import * as SelectedAccountActions from 'actions/SelectedAccountActions';
|
import * as SelectedAccountActions from 'actions/SelectedAccountActions';
|
||||||
import * as SendFormActionActions from 'actions/SendFormActions';
|
import * as SendFormActions from 'actions/SendFormActions';
|
||||||
import * as DiscoveryActions from 'actions/DiscoveryActions';
|
import * as DiscoveryActions from 'actions/DiscoveryActions';
|
||||||
import * as RouterActions from 'actions/RouterActions';
|
import * as RouterActions from 'actions/RouterActions';
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ const WalletService: Middleware = (api: MiddlewareAPI) => (next: MiddlewareDispa
|
|||||||
// if "selectedDevice" didn't change observe common values in SelectedAccountReducer
|
// if "selectedDevice" didn't change observe common values in SelectedAccountReducer
|
||||||
if (!await api.dispatch(SelectedAccountActions.observe(prevState, action))) {
|
if (!await api.dispatch(SelectedAccountActions.observe(prevState, action))) {
|
||||||
// if "selectedAccount" didn't change observe send form props changes
|
// if "selectedAccount" didn't change observe send form props changes
|
||||||
api.dispatch(SendFormActionActions.observe(prevState, action));
|
api.dispatch(SendFormActions.observe(prevState, action));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// no changes in common values
|
// no changes in common values
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import SendFormActions from 'actions/SendFormActions';
|
import SendFormActions from 'actions/ethereum/SendFormActions';
|
||||||
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
|
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
|
||||||
import type { State, Dispatch } from 'flowtype';
|
import type { State, Dispatch } from 'flowtype';
|
||||||
import AccountSend from './index';
|
import AccountSend from './index';
|
||||||
@ -12,7 +12,7 @@ type OwnProps = {}
|
|||||||
|
|
||||||
export type StateProps = {
|
export type StateProps = {
|
||||||
selectedAccount: $ElementType<State, 'selectedAccount'>,
|
selectedAccount: $ElementType<State, 'selectedAccount'>,
|
||||||
sendForm: $ElementType<State, 'sendForm'>,
|
sendForm: $ElementType<State, 'sendFormEthereum'>,
|
||||||
wallet: $ElementType<State, 'wallet'>,
|
wallet: $ElementType<State, 'wallet'>,
|
||||||
fiat: $ElementType<State, 'fiat'>,
|
fiat: $ElementType<State, 'fiat'>,
|
||||||
localStorage: $ElementType<State, 'localStorage'>,
|
localStorage: $ElementType<State, 'localStorage'>,
|
||||||
@ -26,7 +26,7 @@ export type Props = StateProps & DispatchProps;
|
|||||||
|
|
||||||
const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (state: State): StateProps => ({
|
const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (state: State): StateProps => ({
|
||||||
selectedAccount: state.selectedAccount,
|
selectedAccount: state.selectedAccount,
|
||||||
sendForm: state.sendForm,
|
sendForm: state.sendFormEthereum,
|
||||||
wallet: state.wallet,
|
wallet: state.wallet,
|
||||||
fiat: state.fiat,
|
fiat: state.fiat,
|
||||||
localStorage: state.localStorage,
|
localStorage: state.localStorage,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import SendFormActions from 'actions/SendFormActions';
|
import SendFormActions from 'actions/ripple/SendFormActions';
|
||||||
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
|
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
|
||||||
import type { State, Dispatch } from 'flowtype';
|
import type { State, Dispatch } from 'flowtype';
|
||||||
import AccountSend from './index';
|
import AccountSend from './index';
|
||||||
@ -12,7 +12,7 @@ type OwnProps = { }
|
|||||||
|
|
||||||
export type StateProps = {
|
export type StateProps = {
|
||||||
selectedAccount: $ElementType<State, 'selectedAccount'>,
|
selectedAccount: $ElementType<State, 'selectedAccount'>,
|
||||||
sendForm: $ElementType<State, 'sendForm'>,
|
sendForm: $ElementType<State, 'sendFormRipple'>,
|
||||||
wallet: $ElementType<State, 'wallet'>,
|
wallet: $ElementType<State, 'wallet'>,
|
||||||
fiat: $ElementType<State, 'fiat'>,
|
fiat: $ElementType<State, 'fiat'>,
|
||||||
localStorage: $ElementType<State, 'localStorage'>,
|
localStorage: $ElementType<State, 'localStorage'>,
|
||||||
@ -26,7 +26,7 @@ export type Props = StateProps & DispatchProps;
|
|||||||
|
|
||||||
const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (state: State): StateProps => ({
|
const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (state: State): StateProps => ({
|
||||||
selectedAccount: state.selectedAccount,
|
selectedAccount: state.selectedAccount,
|
||||||
sendForm: state.sendForm,
|
sendForm: state.sendFormRipple,
|
||||||
wallet: state.wallet,
|
wallet: state.wallet,
|
||||||
fiat: state.fiat,
|
fiat: state.fiat,
|
||||||
localStorage: state.localStorage,
|
localStorage: state.localStorage,
|
||||||
|
Loading…
Reference in New Issue
Block a user