Skip to content

feat(wallet): add Copy address button to QRCode component#577

Merged
anonfedora merged 1 commit into
Arenax-gaming:mainfrom
Petah1:feat/qrcode-copy-address
Jun 29, 2026
Merged

feat(wallet): add Copy address button to QRCode component#577
anonfedora merged 1 commit into
Arenax-gaming:mainfrom
Petah1:feat/qrcode-copy-address

Conversation

@Petah1

@Petah1 Petah1 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Closes #561


Summary

  • Adds a "Copy address" button beneath the QR code canvas
  • Uses navigator.clipboard.writeText when available; falls back to execCommand('copy') via a temporary <textarea> for unsupported browsers
  • Button label temporarily changes to "Copied!" for 2 seconds then reverts, with timer cleanup on unmount to prevent memory leaks

Test plan

  • Open the wallet QR code modal and confirm the "Copy address" button renders below the QR image
  • Click the button in a modern browser — verify the wallet address is in the clipboard and the label changes to "Copied!" then reverts after 2 seconds
  • Test in a browser with navigator.clipboard disabled/unavailable — verify the fallback selects the address and the copy still succeeds
  • Rapidly click the button multiple times — confirm no timer stacking or duplicate "Copied!" states
  • Unmount the component while the "Copied!" label is showing — confirm no console warnings about state updates on unmounted components

@Petah1
Petah1 requested a review from anonfedora as a code owner June 24, 2026 16:34
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

@Petah1 is attempting to deploy a commit to the paul joseph's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 24, 2026

Copy link
Copy Markdown

@Petah1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@anonfedora
anonfedora merged commit 15fa65a into Arenax-gaming:main Jun 29, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[frontend] - Add QR code copy-to-clipboard button in wallet deposit modal

2 participants