|
|
@ -1,11 +1,17 @@ |
|
|
|
import React from 'react' |
|
|
|
import React, { Component } from 'react' |
|
|
|
import PropTypes from 'prop-types' |
|
|
|
import { FaBolt, FaChain } from 'react-icons/lib/fa' |
|
|
|
import CurrencyIcon from '../../../../../../../components/CurrencyIcon' |
|
|
|
import { btc } from '../../../../../../../utils' |
|
|
|
import styles from './Pay.scss' |
|
|
|
|
|
|
|
const Pay = ({ |
|
|
|
class Pay extends Component { |
|
|
|
componentDidUpdate() { |
|
|
|
if (this.props.paymentType !== 'lnd') { this.amountInput.focus() } |
|
|
|
} |
|
|
|
|
|
|
|
render() { |
|
|
|
const { |
|
|
|
paymentType, |
|
|
|
setPaymentType, |
|
|
|
invoiceAmount, |
|
|
@ -18,7 +24,7 @@ const Pay = ({ |
|
|
|
currency, |
|
|
|
crypto, |
|
|
|
close |
|
|
|
}) => { |
|
|
|
} = this.props |
|
|
|
const payClicked = () => { |
|
|
|
if (payment_request.length !== 124) { return } |
|
|
|
|
|
|
@ -48,6 +54,7 @@ const Pay = ({ |
|
|
|
</label> |
|
|
|
<input |
|
|
|
type='text' |
|
|
|
ref={(input) => this.amountInput = input} |
|
|
|
size='' |
|
|
|
style={ |
|
|
|
paymentType === 'ln' ? |
|
|
@ -117,6 +124,7 @@ const Pay = ({ |
|
|
|
</section> |
|
|
|
</div> |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Pay.propTypes = { |
|
|
|