-
setRequestCurrencyFilters(!showCurrencyFilters)}
- >
- {currencyName}
-
-
-
-
-
- {currentCurrencyFilters.map(filter => (
- - onCurrencyFilterClick(filter.key)}>
- {filter.name}
-
- ))}
-
+ render() {
+ const {
+ requestform: { amount, memo, showCurrencyFilters },
+ ticker,
+
+ setRequestAmount,
+ setRequestMemo,
+ setCurrency,
+ setRequestCurrencyFilters,
+ currencyName,
+ requestFiatAmount,
+
+ currentCurrencyFilters,
+
+ onRequestSubmit
+ } = this.props
+
+ const onCurrencyFilterClick = currency => {
+ // change the input amount
+ setRequestAmount(btc.convert(ticker.currency, currency, amount))
+
+ setCurrency(currency)
+ setRequestCurrencyFilters(false)
+ }
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
setRequestCurrencyFilters(!showCurrencyFilters)}
+ >
+ {currencyName}
+
+
+
+
+
+ {currentCurrencyFilters.map(filter => (
+ - onCurrencyFilterClick(filter.key)}>
+ {filter.name}
+
+ ))}
+
+
-
-
-
{`≈ ${requestFiatAmount || 0} ${
- ticker.fiatTicker
- }`}
-
-
-
-
-
- 0 ? styles.active : undefined}`}
- onClick={onRequestSubmit}
- >
- Request
-
-
+
+
{`≈ ${requestFiatAmount || 0} ${
+ ticker.fiatTicker
+ }`}
+
+
+
+
+
+ 0 ? styles.active : undefined}`}
+ onClick={onRequestSubmit}
+ >
+ Request
+
+
+