diff --git a/app/components/Contacts/SubmitChannelForm.js b/app/components/Contacts/SubmitChannelForm.js index 207472c4..d3d27e93 100644 --- a/app/components/Contacts/SubmitChannelForm.js +++ b/app/components/Contacts/SubmitChannelForm.js @@ -3,6 +3,7 @@ import PropTypes from 'prop-types' import FaAngleDown from 'react-icons/lib/fa/angle-down' +import AmountInput from 'components/AmountInput' import styles from './SubmitChannelForm.scss' class SubmitChannelForm extends React.Component { @@ -16,6 +17,8 @@ class SubmitChannelForm extends React.Component { updateContactCapacity, openChannel, + ticker, + toggleCurrencyProps: { setContactsCurrencyFilters, showCurrencyFilters, @@ -73,14 +76,11 @@ class SubmitChannelForm extends React.Component {
- updateContactCapacity(event.target.value)} +
- { - this.amountInput = input - }} - size="" - placeholder="0.00000000" - value={currentAmount || ''} - onChange={event => setPayAmount(event.target.value)} - onBlur={onPayAmountBlur} +
diff --git a/app/components/Form/Request.js b/app/components/Form/Request.js index ed0128dc..5f61c28a 100644 --- a/app/components/Form/Request.js +++ b/app/components/Form/Request.js @@ -6,6 +6,7 @@ import hand from 'icons/hand.svg' import FaAngleDown from 'react-icons/lib/fa/angle-down' import { btc } from 'lib/utils' +import AmountInput from 'components/AmountInput' import styles from './Request.scss' const Request = ({ @@ -45,12 +46,11 @@ const Request = ({
- setRequestAmount(event.target.value)} +
{ openChannel: dispatchProps.openChannel, + ticker: stateProps.ticker, + toggleCurrencyProps: { currentCurrencyFilters: stateProps.currentCurrencyFilters, currencyName: stateProps.currencyName, diff --git a/test/unit/components/Form.spec.js b/test/unit/components/Form.spec.js index f4f8a219..ef2cf33a 100644 --- a/test/unit/components/Form.spec.js +++ b/test/unit/components/Form.spec.js @@ -15,10 +15,12 @@ const payFormProps = { invoice: {}, showErrors: {} }, - currency: {}, - crypto: {}, + currency: '', + crypto: '', nodes: [], - ticker: {}, + ticker: { + currency: 'btc' + }, isOnchain: false, isLn: true, diff --git a/test/unit/components/Form/Pay.spec.js b/test/unit/components/Form/Pay.spec.js index 8781090f..ef1503e1 100644 --- a/test/unit/components/Form/Pay.spec.js +++ b/test/unit/components/Form/Pay.spec.js @@ -13,10 +13,12 @@ const defaultProps = { invoice: {}, showErrors: {} }, - currency: {}, - crypto: {}, + currency: '', + crypto: '', nodes: [], - ticker: {}, + ticker: { + currency: 'btc' + }, isOnchain: false, isLn: true, diff --git a/test/unit/components/Form/Request.spec.js b/test/unit/components/Form/Request.spec.js index 1c639701..59da8ee5 100644 --- a/test/unit/components/Form/Request.spec.js +++ b/test/unit/components/Form/Request.spec.js @@ -8,7 +8,9 @@ configure({ adapter: new Adapter() }) const defaultProps = { requestform: {}, - ticker: {}, + ticker: { + currency: 'btc' + }, currentCurrencyFilters: [], showCurrencyFilters: true,