mirror of https://github.com/trezor/trezor-wallet
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.
54 lines
1.5 KiB
54 lines
1.5 KiB
6 years ago
|
/* @flow */
|
||
|
|
||
|
import { bindActionCreators } from 'redux';
|
||
|
import { connect } from 'react-redux';
|
||
5 years ago
|
import { injectIntl } from 'react-intl';
|
||
6 years ago
|
|
||
6 years ago
|
import SendFormActions from 'actions/ripple/SendFormActions';
|
||
5 years ago
|
import { openQrModal } from 'actions/ModalActions';
|
||
6 years ago
|
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
|
||
|
import type { State, Dispatch } from 'flowtype';
|
||
6 years ago
|
import AccountSend from './index';
|
||
6 years ago
|
|
||
5 years ago
|
type OwnProps = {
|
||
5 years ago
|
intl: any,
|
||
|
};
|
||
6 years ago
|
|
||
6 years ago
|
export type StateProps = {
|
||
|
selectedAccount: $ElementType<State, 'selectedAccount'>,
|
||
6 years ago
|
sendForm: $ElementType<State, 'sendFormRipple'>,
|
||
6 years ago
|
wallet: $ElementType<State, 'wallet'>,
|
||
6 years ago
|
fiat: $ElementType<State, 'fiat'>,
|
||
|
localStorage: $ElementType<State, 'localStorage'>,
|
||
5 years ago
|
};
|
||
6 years ago
|
|
||
6 years ago
|
export type DispatchProps = {
|
||
6 years ago
|
sendFormActions: typeof SendFormActions,
|
||
5 years ago
|
openQrModal: typeof openQrModal,
|
||
5 years ago
|
};
|
||
6 years ago
|
|
||
5 years ago
|
export type Props = OwnProps & StateProps & DispatchProps;
|
||
6 years ago
|
|
||
5 years ago
|
const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (
|
||
|
state: State
|
||
|
): StateProps => ({
|
||
6 years ago
|
selectedAccount: state.selectedAccount,
|
||
6 years ago
|
sendForm: state.sendFormRipple,
|
||
6 years ago
|
wallet: state.wallet,
|
||
6 years ago
|
fiat: state.fiat,
|
||
|
localStorage: state.localStorage,
|
||
|
});
|
||
|
|
||
5 years ago
|
const mapDispatchToProps: MapDispatchToProps<Dispatch, OwnProps, DispatchProps> = (
|
||
|
dispatch: Dispatch
|
||
|
): DispatchProps => ({
|
||
6 years ago
|
sendFormActions: bindActionCreators(SendFormActions, dispatch),
|
||
|
});
|
||
|
|
||
5 years ago
|
export default injectIntl(
|
||
|
connect(
|
||
|
mapStateToProps,
|
||
|
mapDispatchToProps
|
||
|
)(AccountSend)
|
||
|
);
|