import React from 'react' import PropTypes from 'prop-types' import Isvg from 'react-inlinesvg' import hand from 'icons/hand.svg' import { FaAngleDown } from 'react-icons/lib/fa' import { btc } from 'utils' import CurrencyIcon from 'components/CurrencyIcon' import styles from './Request.scss' const Request = ({ requestform: { amount, memo, showCurrencyFilters }, ticker, setRequestAmount, setRequestMemo, setCurrency, setRequestCurrencyFilters, currencyName, currentCurrencyFilters, onRequestSubmit }) => { const onCurrencyFilterClick = (currency) => { // change the input amount setRequestAmount(btc.convert(ticker.currency, currency, amount)) setCurrency(currency) setRequestCurrencyFilters(false) } return (

Request Payment

setRequestMemo(event.target.value)} id='memo' />
setRequestAmount(event.target.value)} id='amount' placeholder='0.00000000' />
setRequestCurrencyFilters(!showCurrencyFilters)}> {currencyName}
    { currentCurrencyFilters.map(filter =>
  • onCurrencyFilterClick(filter.key)}>{filter.name}
  • ) }
0 && styles.active}`} onClick={onRequestSubmit}> Request
) } Request.propTypes = { requestform: PropTypes.shape({ amount: PropTypes.string, memo: PropTypes.string }).isRequired, setRequestAmount: PropTypes.func.isRequired, setRequestMemo: PropTypes.func.isRequired, onRequestSubmit: PropTypes.func.isRequired } export default Request