pull/495/head
slowbackspace 5 years ago
parent c13e761b0e
commit 60e7244b7a

@ -5,6 +5,7 @@ import { Notification, Link } from 'trezor-ui-components';
import Bignumber from 'bignumber.js';
import { FormattedMessage } from 'react-intl';
import { withRouter } from 'react-router-dom';
import type { ContextRouter } from 'react-router';
import l10nCommonMessages from 'views/common.messages';
import { matchPath } from 'react-router';
@ -12,7 +13,7 @@ import { getPattern } from 'support/routes';
import l10nMessages from './index.messages';
import type { Props } from '../../index';
export default withRouter((props: Props) => {
export default withRouter<Props>((props: {| ...Props, ...ContextRouter |}) => {
const { selectedAccount } = props;
const { account } = selectedAccount;
const { location } = props.router;

@ -3,13 +3,15 @@ import * as React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as ImportAccountActions from 'actions/ImportAccountActions';
import type { State, Dispatch } from 'flowtype';
import type { State, Dispatch, TrezorDevice, Config } from 'flowtype';
import ImportView from './index';
type OwnProps = {|
children?: React.Node,
|};
export type StateProps = {|
device: ?TrezorDevice,
config: Config,
importAccount: $ElementType<State, 'importAccount'>,
|};

@ -87,7 +87,11 @@ const Import = (props: Props) => {
!selectedNetwork || address === '' || props.importAccount.loading
}
onClick={() =>
props.importAddress(address, selectedNetwork.value, props.device)
props.importAddress(
address,
(selectedNetwork || {}).value,
props.device
)
}
>
Import

Loading…
Cancel
Save