import React, { Component } from 'react' import PropTypes from 'prop-types' import Isvg from 'react-inlinesvg' import paperPlane from 'icons/paper_plane.svg' import { FaBolt, FaChain, FaAngleDown } from 'react-icons/lib/fa' import LoadingBolt from 'components/LoadingBolt' import CurrencyIcon from 'components/CurrencyIcon' import styles from './Pay.scss' class Pay extends Component { componentDidUpdate(prevProps) { const { isOnchain, isLn, payform: { payInput }, fetchInvoice } = this.props // If on-chain, focus on amount to let user know it's editable if (isOnchain) { this.amountInput.focus() } // If LN go retrieve invoice details if ((prevProps.payform.payInput !== payInput) && isLn) { fetchInvoice(payInput) } } render() { const { payform: { amount, payInput, showErrors }, currency, crypto, isOnchain, isLn, currentAmount, usdAmount, inputCaption, showPayLoadingScreen, payFormIsValid: { errors, isValid }, setPayAmount, onPayAmountBlur, setPayInput, onPayInputBlur, onPaySubmit } = this.props console.log('usdAmount: ', usdAmount) return (
{showPayLoadingScreen && }

Make Payment