Category: Frontend - Bug
Priority: Low
Estimated Time: 30 minutes
Description:
app/(app)/wallet/page.tsx calls navigator.clipboard.writeText() in an async function without a try/catch. The Clipboard API throws in non-secure contexts and can be denied by browser permissions. A failed copy silently leaves copied as false with no user feedback, making the user believe the copy succeeded or failed with no explanation.
// app/(app)/wallet/page.tsx
async function copyAddress() {
if (!wallet) return
await navigator.clipboard.writeText(wallet.address) // unhandled rejection
setCopied(true)
setTimeout(() => setCopied(false), 2000)
}
Tasks:
- Wrap the clipboard call in
try/catch
- On failure, show a toast or an inline error: "Could not copy — please select and copy the address manually"
- Add a test mocking a clipboard permission denial
Category: Frontend - Bug
Priority: Low
Estimated Time: 30 minutes
Description:
app/(app)/wallet/page.tsxcallsnavigator.clipboard.writeText()in anasyncfunction without atry/catch. The Clipboard API throws in non-secure contexts and can be denied by browser permissions. A failed copy silently leavescopiedasfalsewith no user feedback, making the user believe the copy succeeded or failed with no explanation.Tasks:
try/catch