import React from 'react' import PropTypes from 'prop-types' import ReactModal from 'react-modal' import copy from 'copy-to-clipboard' import QRCode from 'qrcode.react' import { showNotification } from 'notifications' import { MdClose } from 'react-icons/lib/md' import { FaCopy } from 'react-icons/lib/fa' import styles from './ReceiveModal.scss' const ReceiveModal = ({ isOpen, hideActivityModal, pubkey, address, newAddress, qrCodeType, changeQrCode }) => { const customStyles = { overlay: { cursor: 'pointer' }, content: { top: 'auto', left: '20%', right: '0', bottom: 'auto', width: '40%', margin: '50px auto', borderRadius: 'none', padding: '0' } } const copyOnClick = (data) => { copy(data) showNotification('Noice', 'Successfully copied to clipboard') } return ( hideActivityModal()} parentSelector={() => document.body} style={customStyles} >
hideActivityModal()}>
  • Wallet address
  • Node pubkey

Deposit Address

newAddress('np2wkh')}>New Address

{address} copyOnClick(address)} className='hint--left' data-hint='Copy address'>

Node Public Key

{pubkey} copyOnClick(pubkey)} className='hint--left' data-hint='Copy pubkey'>

) } ReceiveModal.propTypes = { isOpen: PropTypes.bool.isRequired, hideActivityModal: PropTypes.func.isRequired, pubkey: PropTypes.string.isRequired, address: PropTypes.string.isRequired, newAddress: PropTypes.func.isRequired, changeQrCode: PropTypes.func.isRequired, qrCodeType: PropTypes.number.isRequired } export default ReceiveModal