fix(withdraw): stop success receipt showing 'Sent to undefined' - #2572
Conversation
external-wallet withdrawals have no recipient username or parsed identifier, so the drawer's userName was undefined and the header rendered the literal string. fall back to the recipient address (shortened by printableUserHandle) like recipientName already does.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe payment success view expands the transaction drawer’s recipient-name fallback chain to include request-link recipient addresses and recipient names after existing username and recipient-identifier values. ChangesPayment receipt display
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code-analysis diffPainscore total: 6310.83 → 6311.08 (+0.25) 🆕 New findings (3)
✅ Resolved (3)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
Reported by Kush while verifying the ENS hotfix: withdrawing to an external crypto wallet shows "Sent to undefined" in the success receipt drawer.
Root cause (pre-existing since May 2025, exposed by the crypto-withdraw path):
PaymentSuccessViewbuilds the drawer'suserNameasuser?.username || parsedPaymentData?.recipient?.identifier— both undefined for an external-wallet withdrawal — whilerecipientNamea few lines up already has a proper address fallback.getTitlethen rendersSent to ${undefined}.Fix: fall back to
chargeDetails.requestLink?.recipientAddress(shortened byprintableUserHandleat render), thenrecipientName.Risks / breaking changes
main→ back-merge debt (main→dev).QA
Screenshots: N/A capture (state requires a live withdraw); before-image in the report thread.
Summary by CodeRabbit