import * as React from 'react' import QRCode from 'qrcode' import copy from 'copy-to-clipboard' import Notification from './Notification' import { WALLETCONNECT_CTA_TEXT_ID } from '../constants' import { TextMap } from '../types' async function formatQRCodeImage(data: string) { let result = '' // @ts-ignore const dataString = await QRCode.toString(data, { margin: 0, type: 'svg' }) if (typeof dataString === 'string') { result = dataString.replace( ' { formatQRCodeImage(props.uri).then(setSvg) }, [props.uri]) const copyToClipboard = () => { const success = copy(props.uri) if (success) { setNotification(props.text.copied_to_clipboard) setInterval(() => setNotification(''), 1200) } else { setNotification('Error') setInterval(() => setNotification(''), 1200) } } return (

{props.text.scan_qrcode_with_wallet}

{props.text.copy_to_clipboard}
) } export default QRCodeDisplay