You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-wallet/src/views/Wallet/views/Account/Receive/ethereum/Container.js

49 lines
1.2 KiB

/* @flow */
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { injectIntl } from 'react-intl';
import { showAddress } from 'actions/ReceiveActions';
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
import type { State, Dispatch } from 'flowtype';
6 years ago
import Receive from './index';
type OwnProps = {
intl: any,
5 years ago
};
type StateProps = {
selectedAccount: $ElementType<State, 'selectedAccount'>,
receive: $ElementType<State, 'receive'>,
modal: $ElementType<State, 'modal'>,
wallet: $ElementType<State, 'wallet'>,
5 years ago
};
type DispatchProps = {
5 years ago
showAddress: typeof showAddress,
};
export type Props = OwnProps & StateProps & DispatchProps;
5 years ago
const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (
state: State
): StateProps => ({
selectedAccount: state.selectedAccount,
receive: state.receive,
modal: state.modal,
wallet: state.wallet,
});
5 years ago
const mapDispatchToProps: MapDispatchToProps<Dispatch, OwnProps, DispatchProps> = (
dispatch: Dispatch
): DispatchProps => ({
showAddress: bindActionCreators(showAddress, dispatch),
});
5 years ago
export default injectIntl(
connect(
mapStateToProps,
mapDispatchToProps
)(Receive)
);