import React from 'react' import PropTypes from 'prop-types' import { btc } from 'lib/utils' import Hand from 'components/Icon/Hand' import AmountInput from 'components/AmountInput' import { Button, Dropdown } from 'components/UI' import { FormattedNumber, FormattedMessage, injectIntl } from 'react-intl' import messages from './messages' import styles from './Request.scss' const Request = ({ requestform: { amount, memo }, ticker, setRequestAmount, setRequestMemo, setCurrency, requestFiatAmount, currencyFilters, onRequestSubmit, intl }) => { const onCurrencyFilterClick = currency => { // change the input amount setRequestAmount(btc.convert(ticker.currency, currency, amount)) setCurrency(currency) } return (

{'≈ '}
setRequestMemo(event.target.value)} id="memo" />
) } Request.propTypes = { requestform: PropTypes.shape({ amount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), memo: PropTypes.string }).isRequired, requestFiatAmount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), currencyName: PropTypes.string.isRequired, currencyFilters: PropTypes.array.isRequired, setRequestAmount: PropTypes.func.isRequired, setRequestMemo: PropTypes.func.isRequired, onRequestSubmit: PropTypes.func.isRequired, setCurrency: PropTypes.func.isRequired, ticker: PropTypes.object.isRequired } export default injectIntl(Request)