-
Notifications
You must be signed in to change notification settings - Fork 13
chore: sync hot-fixes from prod to staging #1198
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
Remove account management button
…unt-limit Hotfix: Increase Daimo amount limit
Support page feature
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughUpdates include raising DaimoPayButton maxAmount to 30_000 in two places, adding /support as a public path and adjusting auth gating, adding Support navigation/links in error page, footer, and a landing section, and removing the “Bank accounts” item from the Profile menu. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks (1 warning, 2 inconclusive)❌ Failed checks (1 warning, 2 inconclusive)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. ✨ 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: 0
🧹 Nitpick comments (2)
src/components/Common/ActionListDaimoPayButton.tsx (2)
125-126
: Avoid stale closure: add peanutWalletAddress to dependencies.
peanutWalletAddress
is used inside the callback but not listed in the deps array, risking stale values if the wallet changes.Apply:
- [chargeDetails, completeDaimoPayment, dispatch] + [chargeDetails, completeDaimoPayment, dispatch, peanutWalletAddress]
114-119
: Tighten log copy to reflect DB sync, not initiation.The error happens during completion/sync, not initiation. Clarifying logs helps triage and aligns with prior guidance to avoid confusing users.
- console.error('Payment initiation failed:', result.error) + console.error('Payment completion sync failed:', result.error) ... - console.error('Error completing daimo payment:', e) + console.error('Error syncing completion after Daimo payment:', e)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
src/app/(mobile-ui)/add-money/crypto/direct/page.tsx
(1 hunks)src/app/(mobile-ui)/layout.tsx
(2 hunks)src/app/[...recipient]/error.tsx
(2 hunks)src/components/Common/ActionListDaimoPayButton.tsx
(1 hunks)src/components/LandingPage/Footer.tsx
(1 hunks)src/components/LandingPage/securityBuiltIn.tsx
(2 hunks)src/components/Profile/index.tsx
(1 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: Zishan-7
PR: peanutprotocol/peanut-ui#1094
File: src/components/AddWithdraw/DynamicBankAccountForm.tsx:279-279
Timestamp: 2025-08-14T08:02:26.705Z
Learning: For hotfixes in the peanut-ui codebase, prefer generic error messages over specific validation error details until the copy can be reviewed with the team, even when the validation functions return detailed error messages.
📚 Learning: 2024-10-29T12:19:41.968Z
Learnt from: jjramirezn
PR: peanutprotocol/peanut-ui#495
File: src/components/Global/TokenAmountInput/index.tsx:23-30
Timestamp: 2024-10-29T12:19:41.968Z
Learning: In the `TokenAmountInput` component (`src/components/Global/TokenAmountInput/index.tsx`), when the 'Max' button is clicked, we intentionally set the input denomination to 'TOKEN' because we are setting the value as token.
Applied to files:
src/app/(mobile-ui)/add-money/crypto/direct/page.tsx
src/components/Common/ActionListDaimoPayButton.tsx
📚 Learning: 2024-10-08T20:13:42.967Z
Learnt from: Hugo0
PR: peanutprotocol/peanut-ui#420
File: src/components/Offramp/Offramp.consts.ts:27-28
Timestamp: 2024-10-08T20:13:42.967Z
Learning: In `src/components/Offramp/Offramp.consts.ts`, the `MIN_CASHOUT_LIMIT` is set to $10 because smaller amounts are impractical due to approximately $1 fee per cashout.
Applied to files:
src/app/(mobile-ui)/add-money/crypto/direct/page.tsx
📚 Learning: 2024-10-29T12:20:47.207Z
Learnt from: jjramirezn
PR: peanutprotocol/peanut-ui#495
File: src/components/Create/Link/Input.view.tsx:244-248
Timestamp: 2024-10-29T12:20:47.207Z
Learning: In the `TokenAmountInput` component within `src/components/Global/TokenAmountInput/index.tsx`, when `balance` is undefined, the `maxValue` prop should be set to an empty string `''`.
Applied to files:
src/app/(mobile-ui)/add-money/crypto/direct/page.tsx
📚 Learning: 2025-08-22T07:25:59.304Z
Learnt from: Zishan-7
PR: peanutprotocol/peanut-ui#1104
File: src/components/Payment/PaymentForm/index.tsx:596-600
Timestamp: 2025-08-22T07:25:59.304Z
Learning: The `TokenAmountInput` component in `src/components/Global/TokenAmountInput/` always returns decimal strings (e.g., "1,234.56"), not base units. When passing these values to external APIs like Daimo's `toUnits` prop, simply stripping commas with `.replace(/,/g, '')` is sufficient.
Applied to files:
src/app/(mobile-ui)/add-money/crypto/direct/page.tsx
📚 Learning: 2025-08-26T15:25:53.328Z
Learnt from: Zishan-7
PR: peanutprotocol/peanut-ui#1132
File: src/app/[...recipient]/client.tsx:394-397
Timestamp: 2025-08-26T15:25:53.328Z
Learning: In `src/components/Common/ActionListDaimoPayButton.tsx`, the `handleCompleteDaimoPayment` function should not display error messages to users when DB update fails because the Daimo payment itself has succeeded - showing errors would be confusing since the payment was successful.
Applied to files:
src/components/Common/ActionListDaimoPayButton.tsx
📚 Learning: 2025-08-22T07:28:32.281Z
Learnt from: Zishan-7
PR: peanutprotocol/peanut-ui#1104
File: src/components/Payment/PaymentForm/index.tsx:522-545
Timestamp: 2025-08-22T07:28:32.281Z
Learning: In `src/components/Payment/PaymentForm/index.tsx`, the `handleCompleteDaimoPayment` function is only for updating payment status in the backend after a successful Daimo payment. Payment success/failure is handled by Daimo itself, so try/catch error handling and error display are not needed for backend sync failures - users shouldn't see errors if payment succeeded but database update failed.
Applied to files:
src/components/Common/ActionListDaimoPayButton.tsx
src/app/[...recipient]/error.tsx
🧬 Code graph analysis (2)
src/components/LandingPage/securityBuiltIn.tsx (1)
src/components/0_Bruddle/Button.tsx (1)
Button
(76-267)
src/app/[...recipient]/error.tsx (1)
src/components/0_Bruddle/Button.tsx (1)
Button
(76-267)
⏰ 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
🔇 Additional comments (10)
src/app/(mobile-ui)/add-money/crypto/direct/page.tsx (1)
95-95
: LGTM - Consistent maxAmount increase.The maxAmount increase from 4,000 to 30,000 matches the corresponding change in
ActionListDaimoPayButton.tsx
, ensuring consistency across DaimoPayButton implementations.src/components/Profile/index.tsx (1)
72-79
: Clean temporary removal with clear restoration path.The Bank accounts menu item has been properly commented out with a clear note for future re-enabling. The placeholder maintains the code structure for easy restoration when the Account Management project is ready.
src/components/LandingPage/securityBuiltIn.tsx (2)
2-2
: LGTM - Button import added.Import statement correctly adds the Button component from the Bruddle design system.
85-96
: LGTM - Support CTA implementation.The conditional "Talk to Support" button is properly implemented:
- Correctly targets feature ID 3 (24/7 HELP)
- Uses proper Button styling with
shadowSize="4"
- Links to the
/support
path consistently with other changes in this PR- Maintains clean separation with appropriate spacing
src/app/[...recipient]/error.tsx (2)
5-8
: LGTM - Client-side routing added.The useRouter import and instantiation properly enable navigation functionality for the error page.
22-28
: LGTM - Support contact option added.The changes improve error handling UX by:
- Adding vertical flex layout (
flex flex-col gap-3
) for better button arrangement- Providing a "Contact Support" option that navigates to
/support
- Using appropriate transparent variant styling for the secondary action
src/components/LandingPage/Footer.tsx (1)
60-62
: LGTM - Support link added to footer.The internal link to
/support
is properly positioned and styled consistently with other footer links.src/app/(mobile-ui)/layout.tsx (2)
24-25
: LGTM - Public path regex updated.The regex correctly extends public path handling to include
/support
, maintaining the existing pattern structure.
84-87
: LGTM - Authentication gating updated.The changes properly implement public path support by:
- Line 85: Defining
isPublicPath
based on the updated regex- Line 87: Updating the loading condition to allow public paths to render without authentication
This enables
/support
to be accessible without requiring user authentication, which is appropriate for a support page.src/components/Common/ActionListDaimoPayButton.tsx (1)
138-138
: Extract MAX_DAIMO_USD and confirm limit
- Replace both hard-coded
maxAmount={30_000}
in
•src/components/Common/ActionListDaimoPayButton.tsx:138
•src/app/(mobile-ui)/add-money/crypto/direct/page.tsx:95
withmaxAmount={MAX_DAIMO_USD}
imported from a shared constants file.- Create (or update)
src/constants/daimo.const.ts
with:export const MAX_DAIMO_USD = 30000- Verify that
30000
aligns with the Daimo/provider and backend cap to avoid any validation mismatch.
No description provided.