mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 01:08:27 +00:00
SelectedAccount component state type renamed to avoid confusion with
reducer accountState
This commit is contained in:
parent
b7bed8ee4c
commit
2355d3d784
@ -27,16 +27,16 @@ export type DispatchProps = {
|
||||
|
||||
export type Props = StateProps & DispatchProps;
|
||||
|
||||
export type AccountState = {
|
||||
export type ComponentState = {
|
||||
device: ?TrezorDevice;
|
||||
account: ?Account;
|
||||
discovery: ?Discovery;
|
||||
deviceStatusNotification: ?React$Element<typeof Notification>;
|
||||
}
|
||||
|
||||
export default class SelectedAccount<P> extends Component<Props & P, AccountState> {
|
||||
export default class SelectedAccount<P> extends Component<Props & P, ComponentState> {
|
||||
|
||||
state: AccountState = {
|
||||
state: ComponentState = {
|
||||
device: null,
|
||||
account: null,
|
||||
discovery: null,
|
||||
|
@ -6,19 +6,19 @@ import React, { Component } from 'react';
|
||||
import Tooltip from 'rc-tooltip';
|
||||
import { QRCode } from 'react-qr-svg';
|
||||
|
||||
import selectedAccount from '../SelectedAccount';
|
||||
import SelectedAccount from '../SelectedAccount';
|
||||
import { Notification } from '~/js/components/common/Notification';
|
||||
|
||||
import type { AccountState } from '../SelectedAccount';
|
||||
import type { ComponentState } from '../SelectedAccount';
|
||||
import type { Props } from './index';
|
||||
|
||||
export default class Receive extends selectedAccount<Props> {
|
||||
export default class Receive extends SelectedAccount<Props> {
|
||||
render() {
|
||||
return super.render() || _render(this.props, this.state);
|
||||
}
|
||||
}
|
||||
|
||||
const _render = (props: Props, state: AccountState): React$Element<string> => {
|
||||
const _render = (props: Props, state: ComponentState): React$Element<string> => {
|
||||
|
||||
const {
|
||||
device,
|
||||
|
@ -17,8 +17,6 @@ import type {
|
||||
DispatchProps as BaseDispatchProps
|
||||
} from '../SelectedAccount';
|
||||
|
||||
import type { AccountState } from '../SelectedAccount';
|
||||
|
||||
type OwnProps = { }
|
||||
|
||||
type StateProps = BaseStateProps & {
|
||||
|
@ -11,7 +11,7 @@ import SelectedAccount from '../SelectedAccount';
|
||||
import { findAccountTokens } from '~/js/reducers/TokensReducer';
|
||||
|
||||
import type { Props } from './index';
|
||||
import type { AccountState } from '../SelectedAccount';
|
||||
import type { ComponentState } from '../SelectedAccount';
|
||||
|
||||
export default class Send extends SelectedAccount<Props> {
|
||||
render() {
|
||||
@ -19,7 +19,7 @@ export default class Send extends SelectedAccount<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
const _render = (props: Props, state: AccountState): React$Element<string> => {
|
||||
const _render = (props: Props, state: ComponentState): React$Element<string> => {
|
||||
|
||||
const {
|
||||
device,
|
||||
|
@ -13,7 +13,7 @@ import SummaryDetails from './SummaryDetails.js';
|
||||
import SummaryTokens from './SummaryTokens.js';
|
||||
|
||||
import type { Props } from './index';
|
||||
import type { AccountState } from '../SelectedAccount';
|
||||
import type { ComponentState } from '../SelectedAccount';
|
||||
|
||||
import type { TrezorDevice } from '~/flowtype';
|
||||
import type { NetworkToken } from '~/js/reducers/LocalStorageReducer';
|
||||
@ -27,7 +27,7 @@ export default class Summary extends SelectedAccount<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
const _render = (props: Props, state: AccountState): React$Element<string> => {
|
||||
const _render = (props: Props, state: ComponentState): React$Element<string> => {
|
||||
|
||||
const {
|
||||
device,
|
||||
|
Loading…
Reference in New Issue
Block a user