Skip to content

chore: withdraw temp unavaillable for non-euro sepa countries msg#1337

Merged
Hugo0 merged 1 commit intopeanut-walletfrom
hot-fix/withdraw-unavailable
Oct 17, 2025
Merged

chore: withdraw temp unavaillable for non-euro sepa countries msg#1337
Hugo0 merged 1 commit intopeanut-walletfrom
hot-fix/withdraw-unavailable

Conversation

@kushagrasarathe
Copy link
Contributor

image

@vercel
Copy link

vercel bot commented Oct 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
peanut-wallet Ready Ready Preview Comment Oct 17, 2025 1:27pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 17, 2025

Walkthrough

A withdraw page component is modified to introduce temporary unavailability handling for non-Euro SEPA countries. A boolean flag is derived from currency validation, controlling the display of a warning banner and disabling withdrawal actions while modifying button labels.

Changes

Cohort / File(s) Summary
Non-Euro SEPA Unavailability Logic
src/app/(mobile-ui)/withdraw/[country]/bank/page.tsx
Introduces isNonEuroSepaCountry derived boolean based on currency checking (excluding EUR, USD, MXN). Adds warning banner display, disables Withdraw and Retry buttons, and updates button label to "Temporarily Unavailable" when flag is true.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Single file modification with straightforward conditional UI logic. Changes involve adding a derived boolean flag and using it to conditionally render a banner and disable button states—relatively low complexity with clear intent and limited scope.

Possibly related PRs

  • peanutprotocol/peanut-ui#1285: Modifies the same withdraw page file and adjusts control flow and availability logic for the withdrawal feature.

Suggested labels

enhancement

Suggested reviewers

  • beetrootw
  • Zishan-7

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "chore: withdraw temp unavaillable for non-euro sepa countries msg" is directly related to the main change in the changeset. The raw summary confirms the PR introduces a temporary unavailability feature for non-euro SEPA countries by adding an isNonEuroSepaCountry flag, a warning banner, and disabling the Withdraw button for affected users. The title clearly conveys the primary objective of this change and uses the "chore:" prefix appropriately for a maintenance-oriented update. Note: There is a minor spelling error ("unavaillable" should be "unavailable"), which slightly impacts readability but does not prevent understanding of the change.
Description Check ✅ Passed The pull request description consists of a screenshot image (391x675 pixels) that demonstrates the UI changes made in the changeset. While the description lacks accompanying text explanation, the image directly relates to the PR's objective of showing the temporary unavailability message and button state changes for non-euro SEPA countries in the withdraw flow. As a visual demonstration of the implemented changes, it satisfies the leniency of this check which requires only that the description be related to the changeset in some way.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hot-fix/withdraw-unavailable

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5cd7f65 and 05cc0f2.

📒 Files selected for processing (1)
  • src/app/(mobile-ui)/withdraw/[country]/bank/page.tsx (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
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".
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".
📚 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)/withdraw/[country]/bank/page.tsx
🧬 Code graph analysis (1)
src/app/(mobile-ui)/withdraw/[country]/bank/page.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 (2)
src/app/(mobile-ui)/withdraw/[country]/bank/page.tsx (2)

255-270: Warning banner provides clear user feedback.

The banner is well-styled, clearly communicates the temporary unavailability, and is positioned appropriately before the action buttons.


43-49: Clarify the scope of unavailable countries in the flag logic and comment.

The code correctly extracts nonEuroCurrency as a string, but there's a mismatch between the comment and the actual behavior. The comment states "non-eur sepa countries," yet the flag will also catch non-SEPA currencies like BRL (Brazil) and ARS (Argentina) since the logic only excludes EUR, USD, and MXN.

Update either:

  • The comment to reflect all blocked currencies: "non-EUR SEPA countries and LATAM countries currently experiencing issues"
  • Or the logic to explicitly check SEPA status if the intent is SEPA-only countries

@Hugo0 Hugo0 merged commit c42fff9 into peanut-wallet Oct 17, 2025
5 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants