<commit_before>import React from 'react'
import PropTypes from 'prop-types'
import { FormattedMessage, injectIntl } from 'react-intl'
import { Box, Flex } from 'rebass/styled-components'
import { CopyBox, Bar, Header, QRCode } from 'components/UI'
import { WalletName } from 'components/Util'
import messages from './messages'
import { intlShape } from '@zap/i18n'

const ReceiveModal = ({
  currentAddress,
  cryptoAddressName,
  activeWalletSettings,
  networkInfo,
  showNotification,
  intl,
  ...rest
}) => {
  const notifyOfCopy = () =>
    showNotification(intl.formatMessage({ ...messages.address_copied_notification_description }))

  return (
    <Box {...rest}>
      <Header
        subtitle={
          <FormattedMessage {...messages.receive_subtitle} values={{ cryptoAddressName }} />
        }
        title={
          <>
            <WalletName wallet={activeWalletSettings} />
            {networkInfo && networkInfo.id === 'testnet' && ` (${networkInfo.name})`}
          </>
        }
      />
      <Bar mt={2} />

      {currentAddress && (
        <Flex alignItems="center" flexDirection="column" mb={3} mt={4}>
          <QRCode size="xxlarge" value={currentAddress} />
        </Flex>
      )}

      <CopyBox
        hint={intl.formatMessage({ ...messages.copy_address })}
        my={3}
        onCopy={notifyOfCopy}
        value={currentAddress}
      />
    </Box><commit_msg>feat(ui): display non-mainnet node network name<commit_after>import React from 'react'
import PropTypes from 'prop-types'
import { FormattedMessage, injectIntl } from 'react-intl'
import { Box, Flex } from 'rebass/styled-components'
import { CopyBox, Bar, Header, QRCode } from 'components/UI'
import { WalletName } from 'components/Util'
import messages from './messages'
import { intlShape } from '@zap/i18n'

const ReceiveModal = ({
  currentAddress,
  cryptoAddressName,
  activeWalletSettings,
  networkInfo,
  showNotification,
  intl,
  ...rest
}) => {
  const notifyOfCopy = () =>
    showNotification(intl.formatMessage({ ...messages.address_copied_notification_description }))

  return (
    <Box {...rest}>
      <Header
        subtitle={
          <FormattedMessage {...messages.receive_subtitle} values={{ cryptoAddressName }} />
        }
        title={
          <>
            <WalletName wallet={activeWalletSettings} />
            {networkInfo && networkInfo.id !== 'mainnet' && ` (${networkInfo.name})`}
          </>
        }
      />
      <Bar mt={2} />

      {currentAddress && (
        <Flex alignItems="center" flexDirection="column" mb={3} mt={4}>
          <QRCode size="xxlarge" value={currentAddress} />
        </Flex>
      )}

      <CopyBox
        hint={intl.formatMessage({ ...messages.copy_address })}
        my={3}
        onCopy={notifyOfCopy}
        value={currentAddress}
      />
    </Box>
{'fraction_non_alphanumeric': 0.14476458186929023, 'fraction_numerical': 0.004216444132115249, 'mean_word_length': 2.683053040103493, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6537322', 'n_tokens_mistral': 855, 'n_tokens_neox': 840, 'n_words': 174}