Skip to content

hotfix(add-money): revert bank-step shortcut (AR/BR shown Euro selector)#2278

Merged
Hugo0 merged 1 commit into
mainfrom
hotfix/add-money-eur-regression-revert
Jun 24, 2026
Merged

hotfix(add-money): revert bank-step shortcut (AR/BR shown Euro selector)#2278
Hugo0 merged 1 commit into
mainfrom
hotfix/add-money-eur-regression-revert

Conversation

@jjramirezn

Copy link
Copy Markdown
Contributor

🚨 Prod regression

#2276 (merged to dev, now on main via release #2245) made add-money country-click go straight to /add-money/[country]/bank. That route is the Bridge (EUR/SEPA) bank page. Argentina/Brazil bank deposits go through Manteca (Pix/CBU), which the per-country method picker on /add-money/[country] was correctly resolving.

Skipping that picker forced every country into the Bridge bank page → AR/BR users see a Euro selector when adding money.

Fix

Revert handleCountryClick to addMoneyCountryUrl (the method picker) and remove the addMoneyBankUrl helper + its tests. Restores correct per-country routing.

Scope

Pure revert of #2276's behavior change — these 4 files return to their pre-#2276 state. The double-selection UX nit #2276 tried to fix is separate/lower-priority; a correct fix must be per-country (skip the picker only for single-bank EU/NA countries), not a blanket shortcut.

Tests

native-routes + add-money-states restored to pre-#2276 assertions; pass. (Pre-existing local-only EVM-deposit test failure is unrelated — CI passes it.)

Follow-up

dev also carries #2276 — the post-release maindev back-merge will carry this revert, or cherry-pick if dev ships first.

…he Bridge EUR flow

#2276 made country-click go straight to /add-money/[country]/bank, but that is
the Bridge (EUR/SEPA) bank page. Argentina/Brazil bank deposits route through
Manteca (Pix/CBU), which the per-country method picker on /add-money/[country]
was correctly resolving. Skipping the picker forced every country into the
Bridge bank page, so AR/BR users saw a Euro selector.

Revert to addMoneyCountryUrl (the method picker). The double-selection #2276
tried to remove is a separate, lower-priority UX nit; a correct fix must be
per-country (skip only single-bank EU/NA countries), not a blanket shortcut.
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
peanut-wallet Ready Ready Preview, Comment Jun 24, 2026 11:50pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2622cbef-5040-4448-ab0c-944cc23cf5ff

📥 Commits

Reviewing files that changed from the base of the PR and between 39065c0 and 1b6be68.

📒 Files selected for processing (4)
  • src/app/(mobile-ui)/add-money/__tests__/add-money-states.test.tsx
  • src/app/(mobile-ui)/add-money/page.tsx
  • src/utils/__tests__/native-routes.test.ts
  • src/utils/native-routes.ts
💤 Files with no reviewable changes (2)
  • src/utils/native-routes.ts
  • src/utils/tests/native-routes.test.ts

Walkthrough

Add-money country selection now navigates to the country root route instead of the bank step. The bank URL helper was removed, and the related route tests were updated to match the new path.

Changes

Add Money country routing

Layer / File(s) Summary
Country route change
src/app/(mobile-ui)/add-money/page.tsx, src/app/(mobile-ui)/add-money/__tests__/add-money-states.test.tsx, src/utils/native-routes.ts, src/utils/__tests__/native-routes.test.ts
Country selection now uses addMoneyCountryUrl(country.path) and routes to /add-money/{country}. addMoneyBankUrl was removed from native route helpers and its test coverage, and the add-money state test now expects the country root.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the add-money routing revert and the AR/BR Euro-selector issue.
Description check ✅ Passed The description matches the changeset and explains the routing revert, scope, and tests.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

@github-actions

Copy link
Copy Markdown
Contributor

Code-analysis diff

Painscore total: 5745.45 → 5745.66 (+0.21)
Findings: 0 net (+4 new, -4 resolved)

🆕 New findings (4)

  • high complexity — src/utils/native-routes.ts — CC 40, MI 64.25, SLOC 80
  • medium high-mdd — src/app/(mobile-ui)/add-money/page.tsx:22 — AddMoneyPage: MDD 25.3 (uses across many lines from declarations)
  • medium method-complexity — src/utils/native-routes.ts:64 — rewriteMethodPath CC 16 SLOC 31
  • low high-mdd — src/utils/native-routes.ts:64 — rewriteMethodPath: MDD 11.7 (uses across many lines from declarations)

✅ Resolved (4)

  • src/utils/native-routes.ts — CC 42, MI 64.55, SLOC 84
  • src/app/(mobile-ui)/add-money/page.tsx:22 — AddMoneyPage: MDD 26.5 (uses across many lines from declarations)
  • src/utils/native-routes.ts:73 — rewriteMethodPath CC 16 SLOC 31
  • src/utils/native-routes.ts:73 — rewriteMethodPath: MDD 11.7 (uses across many lines from declarations)

@github-actions

Copy link
Copy Markdown
Contributor

🧪 UI test report — ✅ all green

Suites

  • unit: 1554 ran, 0 failed, 0 skipped, 21.5s

📊 Coverage (unit)

metric %
statements 53.4%
branches 36.3%
functions 40.9%
lines 53.3%
⏱ 10 slowest test cases
time test
0.5s src/app/actions/__tests__/api-headers.test.ts › should include Content-Type in updateUserById
0.3s src/app/actions/__tests__/api-headers-extended.test.ts › should not include apiKey in updateUserById body
0.2s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › every stamp stays within canvas at any count
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle valid 9-digit US account
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle too long for US account
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle valid ETH address in lowercase
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle valid German IBAN
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle valid UK IBAN with spaces
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle valid Italian IBAN
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle invalid ETH address (invalid characters)
📍 Inline annotations are in the **Unit test report** check above. Coverage artifact: `coverage-unit`. Generated by `.github/workflows/tests.yml`.

@Hugo0 Hugo0 merged commit b4f2aff into main Jun 24, 2026
22 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants