From 27e8eae11f82c29f18fd4319b70c73393ee82898 Mon Sep 17 00:00:00 2001 From: kushagrasarathe <76868364+kushagrasarathe@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:49:58 +0530 Subject: [PATCH] fix(withdraw): stop success receipt showing 'Sent to undefined' 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. --- .../payments/shared/components/PaymentSuccessView.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/features/payments/shared/components/PaymentSuccessView.tsx b/src/features/payments/shared/components/PaymentSuccessView.tsx index ef825ffb29..92e6e0fbb4 100644 --- a/src/features/payments/shared/components/PaymentSuccessView.tsx +++ b/src/features/payments/shared/components/PaymentSuccessView.tsx @@ -170,7 +170,13 @@ const PaymentSuccessView = ({ kind: 'DIRECT_TRANSFER', link: receiptLink, }, - userName: user?.username || parsedPaymentData?.recipient?.identifier, + // external-wallet withdrawals have no username/identifier — fall back to + // the recipient address so the receipt never renders "Sent to undefined" + userName: + user?.username || + parsedPaymentData?.recipient?.identifier || + chargeDetails.requestLink?.recipientAddress || + recipientName, sourceView: 'status', memo: chargeDetails.requestLink?.reference || undefined, attachmentUrl: chargeDetails.requestLink?.attachmentUrl || undefined,