-
Notifications
You must be signed in to change notification settings - Fork 13
[TASK-12561] Fix on/off-ramp bugs #1215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Zishan-7
commented
Sep 15, 2025


The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughUpdates the add-money bank page to return fullName and email in initial data, adds a console log of initialData in the user details form, adjusts drawer bottom padding in the KYC status drawer, and changes a button font weight in the transaction details receipt. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (5)
src/components/TransactionDetails/TransactionDetailsReceipt.tsx (3)
523-533
: LGTM on styling tweak; add aria-expanded for a11y on the toggle.The font-weight change is fine. Consider minimal a11y: expose the expanded state.
Apply this diff:
- <button - onClick={() => setShowBankDetails(!showBankDetails)} - className="flex w-full items-center justify-between py-3 text-left text-sm font-normal text-black underline transition-colors" - > + <button + onClick={() => setShowBankDetails(!showBankDetails)} + aria-expanded={showBankDetails} + className="flex w-full items-center justify-between py-3 text-left text-sm font-normal text-black underline transition-colors" + >
862-874
: Guard navigation when link is absent in “Pay” action.If link is undefined, this navigates to ''. Disable the button or no-op to avoid confusing UX.
Apply this diff:
- <Button + <Button + disabled={!transaction.extraDataForDrawer?.link} onClick={() => { - window.location.href = transaction.extraDataForDrawer?.link ?? '' + const link = transaction.extraDataForDrawer?.link + if (link) window.location.href = link }} shadowSize="4" className="flex w-full items-center gap-1" >
1011-1021
: Avoid non‑null assertions for user/link in CancelSendLinkModal action.This can throw if user or link is momentarily unavailable. Add a safe guard.
Apply this diff:
- onClick={() => { + onClick={() => { setIsLoading(true) setShowCancelLinkModal(false) - sendLinksApi - .claim(user!.user.username!, transaction.extraDataForDrawer!.link!) + const username = user?.user.username + const link = transaction.extraDataForDrawer?.link + if (!username || !link) { + console.error('Missing username or link for claim action') + setIsLoading(false) + return + } + sendLinksApi + .claim(username, link)src/components/Kyc/KycStatusDrawer.tsx (1)
123-123
: Padding change looks good; consider safe‑area padding for notched devices.Optional: include iOS/Android safe‑area inset to prevent content from being obscured by system UI.
Apply this diff:
- <DrawerContent className="p-5 pb-12">{renderContent()}</DrawerContent> + <DrawerContent className="p-5 pb-12 pb-[calc(3rem+env(safe-area-inset-bottom))]"> + {renderContent()} + </DrawerContent>src/app/(mobile-ui)/add-money/[country]/bank/page.tsx (1)
244-253
: Drop unused first/last name split and clean useMemo deps.These variables aren’t used in initialUserDetails anymore; remove them and trim the dependency array.
Apply this diff:
- const [firstName, ...lastNameParts] = (user?.user.fullName ?? '').split(' ') - const lastName = lastNameParts.join(' ') - const initialUserDetails: Partial<UserDetailsFormData> = useMemo( () => ({ fullName: user?.user.fullName ?? '', email: user?.user.email ?? '', }), - [user?.user.fullName, user?.user.email, firstName, lastName] + [user?.user.fullName, user?.user.email] )
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
src/app/(mobile-ui)/add-money/[country]/bank/page.tsx
(1 hunks)src/components/AddMoney/UserDetailsForm.tsx
(1 hunks)src/components/Kyc/KycStatusDrawer.tsx
(1 hunks)src/components/TransactionDetails/TransactionDetailsReceipt.tsx
(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-14T14:42:54.411Z
Learnt from: Zishan-7
PR: peanutprotocol/peanut-ui#1094
File: src/utils/withdraw.utils.ts:181-191
Timestamp: 2025-08-14T14:42:54.411Z
Learning: The countryCodeMap in src/components/AddMoney/consts/index.ts uses uppercase 3-letter country codes as keys (like 'AUT', 'BEL', 'CZE') that map to 2-letter country codes, requiring input normalization to uppercase for proper lookups.
Applied to files:
src/app/(mobile-ui)/add-money/[country]/bank/page.tsx
📚 Learning: 2025-05-22T15:38:48.586Z
Learnt from: kushagrasarathe
PR: peanutprotocol/peanut-ui#869
File: src/app/(mobile-ui)/withdraw/page.tsx:82-88
Timestamp: 2025-05-22T15:38:48.586Z
Learning: The country-specific withdrawal route exists at src/app/(mobile-ui)/withdraw/[...country]/page.tsx and renders the AddWithdrawCountriesList component with flow="withdraw".
Applied to files:
src/app/(mobile-ui)/add-money/[country]/bank/page.tsx
🧬 Code graph analysis (1)
src/components/Kyc/KycStatusDrawer.tsx (1)
src/components/Global/Drawer/index.tsx (1)
DrawerContent
(86-86)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Deploy-Preview