import React from 'react'; import { connect } from 'react-redux'; import { donationAddressMap } from 'config'; import translate from 'translations'; import { AppState } from 'features/reducers'; import { getChecksumAddressFn } from 'features/config'; import { Input } from 'components/ui'; import { AddressFieldFactory } from './AddressFieldFactory'; interface OwnProps { isReadOnly?: boolean; isSelfAddress?: boolean; isCheckSummed?: boolean; showLabelMatch?: boolean; } interface StateProps { toChecksumAddress: ReturnType; } type Props = OwnProps & StateProps; const AddressField: React.SFC = ({ isReadOnly, isSelfAddress, isCheckSummed, showLabelMatch, toChecksumAddress }) => ( (
)} /> ); export default connect((state: AppState): StateProps => ({ toChecksumAddress: getChecksumAddressFn(state) }))(AddressField);