// @flow import React from 'react'; import Button from 'component/button'; import CopyableText from 'component/copyableText'; import QRCode from 'component/common/qr-code'; import Card from 'component/common/card'; import LbcSymbol from 'component/common/lbc-symbol'; type Props = { checkAddressIsMine: string => void, receiveAddress: string, getNewAddress: () => void, gettingNewAddress: boolean, }; type State = { showQR: boolean, }; class WalletAddress extends React.PureComponent { constructor(props: Props) { super(props); this.state = { showQR: false, }; (this: any).toggleQR = this.toggleQR.bind(this); } componentDidMount() { const { checkAddressIsMine, receiveAddress, getNewAddress } = this.props; if (!receiveAddress) { getNewAddress(); } else { checkAddressIsMine(receiveAddress); } } toggleQR() { this.setState({ showQR: !this.state.showQR, }); } render() { const { receiveAddress, getNewAddress, gettingNewAddress } = this.props; const { showQR } = this.state; return ( } subtitle={__('Use this address to receive LBRY Credits.')} actions={
{!IS_WEB && (

{!IS_WEB && __('You can generate a new address at any time, and any previous addresses will continue to work.')}

{showQR && }
} /> ); } } export default WalletAddress;