Skip to content

feat(manteca): BRL PIX deposit QR screen (ramp-on details.qr) [draft, depends on api#1093]#2315

Closed
abalinda wants to merge 5 commits into
devfrom
feat/pix-qr-deposit
Closed

feat(manteca): BRL PIX deposit QR screen (ramp-on details.qr) [draft, depends on api#1093]#2315
abalinda wants to merge 5 commits into
devfrom
feat/pix-qr-deposit

Conversation

@abalinda

@abalinda abalinda commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

BRL PIX deposit — frontend · ⚠️ draft, depends on api#1093 + Manteca

Adds a showQR step to the Manteca Add-Money flow for BRL: renders the dynamic PIX QR from the ramp-on synthetic's details.qr, with a live m:ss expiry countdown and a "copia e cola" copy button. Status polling advances QR → processing → "Deposit received!" — the branded CyclingLoading (Peanut spin + rotating messages, same as PIX payments) shows while the deposit settles. ARS keeps its existing bank-details screen, untouched.

Flow: POST /manteca/deposit (BRL) → ramp-on synthetic with details.qrshowQR (routed by currency) → poll GET /manteca/deposit/:id/statusprocessing (settling) → success on COMPLETED.

Also in this PR:

  • Add money → Brazil defaults the input denomination to BRL (PIX is in BRL); other countries keep USD.
  • Reuses CyclingLoading for the QR-generating and settlement waits, so the deposit flow is visually in-line with PIX-payment processing.
  • QRCodeWrapper gains an optional className width-override (zero blast radius on other callers).

Notes:

  • Cross-repo: depends on api#1093 — land BE first.
  • details.qr is a stub until Manteca confirms the field name (the screen shows the branded loader while it's absent).
  • Tests: useMantecaDepositPolling (incl. the new processing state) + MantecaPixQrDeposit — 8/8.

Companion to peanut-api-ts #1093. For BRL, Add Money now shows Manteca's dynamic
PIX QR instead of the static bank-details screen: render the copia-e-cola via
QRCodeWrapper, a copy button, a live m:ss expiry countdown, and poll the deposit
intent status to auto-advance to a success state. ARS path untouched.

- showQR step (nuqs) routed by the response discriminator (type === 'QR')
- useMantecaDepositPolling: read-only mirror of GET /manteca/deposit/:id/status
- QRCodeWrapper gains an optional className width-override (160 -> 280px here)
- hook + component tests
@vercel

vercel Bot commented Jun 30, 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 Jul 2, 2026 7:28am

Request Review

@coderabbitai

coderabbitai Bot commented Jun 30, 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: c8e0dd7e-16ac-43fb-96cf-15d05f297698

📥 Commits

Reviewing files that changed from the base of the PR and between bff0028 and 0ddfb3b.

📒 Files selected for processing (5)
  • src/components/AddMoney/components/MantecaAddMoney.tsx
  • src/components/AddMoney/components/MantecaPixQrDeposit.tsx
  • src/components/AddMoney/consts/index.ts
  • src/components/AddMoney/hooks/__tests__/useMantecaDepositPolling.test.tsx
  • src/components/AddMoney/hooks/useMantecaDepositPolling.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/components/AddMoney/hooks/useMantecaDepositPolling.ts
  • src/components/AddMoney/hooks/tests/useMantecaDepositPolling.test.tsx
  • src/components/AddMoney/components/MantecaPixQrDeposit.tsx
  • src/components/AddMoney/components/MantecaAddMoney.tsx

Walkthrough

Adds a BRL PIX QR deposit path to the Manteca add-money flow. The PR adds deposit-status polling, a QR deposit screen with expiry handling, showQR routing in MantecaAddMoney, and removes the prior BRL PIX maintenance banner wiring.

Changes

PIX QR Deposit Flow

Layer / File(s) Summary
PIX contract and status API
src/types/manteca.types.ts, src/services/manteca.ts
Adds qr?: string to deposit details and introduces mantecaApi.getDepositStatus(depositId) for /manteca/deposit/{depositId}/status.
Deposit polling hook
src/components/AddMoney/hooks/useMantecaDepositPolling.ts, src/components/AddMoney/hooks/__tests__/useMantecaDepositPolling.test.tsx
Adds a polling hook that maps API status into pending/processing/completed/failed, stops on terminal statuses, and calls onComplete once; tests cover pending, completed, cancelled, processing, and missing-id cases.
PIX QR deposit screen
src/components/AddMoney/components/MantecaPixQrDeposit.tsx, src/components/Global/QRCodeWrapper/index.tsx, src/components/AddMoney/components/__tests__/MantecaPixQrDeposit.test.tsx
Renders the QR deposit UI with expiry countdown, expired/completed states, and copy actions; QRCodeWrapper now merges className. Tests cover pending, expired, and completed rendering.
showQR step integration
src/components/AddMoney/components/MantecaAddMoney.tsx, src/components/AddMoney/consts/index.ts
Extends URL step handling with showQR, routes BRL deposits to the QR screen, removes maintenance-banner wiring, and filters the Brazil add-money methods list to exclude bank-transfer-add.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested labels: enhancement

Suggested reviewers: Hugo0, jjramirezn

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: a BRL PIX deposit QR screen using details.qr.
Description check ✅ Passed The description matches the changeset, covering the new showQR flow, polling, countdown, and QRWrapper update.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Code-analysis diff

Painscore total: 5862.92 → 5873.38 (+10.46)
Findings: +3 net (+17 new, -14 resolved)

🆕 New findings (17)

  • critical complexity — src/components/AddMoney/components/MantecaAddMoney.tsx — CC 58, MI 56.81, SLOC 212
  • critical complexity — src/components/AddMoney/consts/index.ts — CC 33, MI 23.98, SLOC 2252
  • high complexity — src/services/manteca.ts — CC 48, MI 56.59, SLOC 216
  • high hotspot — src/components/AddMoney/components/MantecaAddMoney.tsx — 35 commits, +315/-204 lines since 6 months ago
  • medium high-mdd — src/components/AddMoney/components/MantecaAddMoney.tsx:37 — MantecaAddMoney: MDD 126.2 (uses across many lines from declarations)
  • medium high-mdd — src/components/AddMoney/consts/index.ts:2675 — : MDD 33.6 (uses across many lines from declarations)
  • medium structural-dup — app/(mobile-ui)/withdraw/manteca/page.tsx:631 — 29 duplicate lines / 132 tokens with components/AddMoney/components/MantecaAddMoney.tsx:265
  • medium structural-dup — services/manteca.ts:151 — 29 duplicate lines / 56 tokens with services/manteca.ts:412
  • medium high-mdd — src/components/AddMoney/components/MantecaPixQrDeposit.tsx:20 — MantecaPixQrDeposit: MDD 29.3 (uses across many lines from declarations)
  • medium method-complexity — src/components/AddMoney/components/MantecaAddMoney.tsx:37 — CC 18 SLOC 97
  • medium complexity — src/components/AddMoney/components/MantecaPixQrDeposit.tsx — CC 17, MI 65.04, SLOC 45
  • medium complexity — src/components/AddMoney/hooks/useMantecaDepositPolling.ts — CC 15, MI 65.25, SLOC 42
  • low structural-dup — components/AddMoney/components/MantecaAddMoney.tsx:258 — 18 duplicate lines / 122 tokens with components/Claim/Link/MantecaFlowManager.tsx:145
  • low high-mdd — src/components/Global/QRCodeWrapper/index.tsx:18 — QRCodeWrapper: MDD 16.0 (uses across many lines from declarations)
  • low high-mdd — src/services/manteca.ts:403 — withdrawWithSignedTx: MDD 11.4 (uses across many lines from declarations)
  • low missing-return-type — src/components/AddMoney/hooks/useMantecaDepositPolling.ts:21 — useMantecaDepositPolling: exported fn missing return type annotation
  • low enum-usage — src/types/manteca.types.ts:59 — enum MercadoPagoStep — prefer as const object literals

✅ Resolved (14)

  • src/components/AddMoney/components/MantecaAddMoney.tsx — CC 50, MI 56.79, SLOC 191
  • src/components/AddMoney/consts/index.ts — CC 31, MI 24.04, SLOC 2250
  • src/services/manteca.ts — CC 44, MI 56.94, SLOC 201
  • src/components/AddMoney/components/MantecaAddMoney.tsx — 31 commits, +255/-167 lines since 6 months ago
  • src/components/AddMoney/components/MantecaAddMoney.tsx:37 — MantecaAddMoney: MDD 112.1 (uses across many lines from declarations)
  • src/components/AddMoney/consts/index.ts:2675 — : MDD 31.8 (uses across many lines from declarations)
  • app/(mobile-ui)/withdraw/manteca/page.tsx:631 — 29 duplicate lines / 132 tokens with components/AddMoney/components/MantecaAddMoney.tsx:246
  • services/manteca.ts:151 — 29 duplicate lines / 56 tokens with services/manteca.ts:399
  • src/components/AddMoney/components/MantecaAddMoney.tsx:37 — CC 15 SLOC 90
  • src/components/AddMoney/components/MantecaAddMoney.tsx:228 — small useEffect that only sets state from deps
  • components/AddMoney/components/MantecaAddMoney.tsx:239 — 18 duplicate lines / 122 tokens with components/Claim/Link/MantecaFlowManager.tsx:145
  • src/components/Global/QRCodeWrapper/index.tsx:16 — QRCodeWrapper: MDD 16.0 (uses across many lines from declarations)
  • src/services/manteca.ts:390 — withdrawWithSignedTx: MDD 11.4 (uses across many lines from declarations)
  • src/types/manteca.types.ts:57 — enum MercadoPagoStep — prefer as const object literals

📈 Painscore deltas (top movers)

File Before After Δ
src/components/AddMoney/components/MantecaPixQrDeposit.tsx 0.0 6.4 +6.4
src/components/AddMoney/hooks/useMantecaDepositPolling.ts 0.0 5.4 +5.4

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🧪 UI test report — ✅ all green

Suites

  • unit: 1651 ran, 0 failed, 0 skipped, 26.0s

📊 Coverage (unit)

metric %
statements 54.8%
branches 37.7%
functions 42.5%
lines 54.7%
⏱ 10 slowest test cases
time test
3.4s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › never places two stickers in heavy overlap (broad seed sweep)
0.5s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › every sticker stays within canvas at any count
0.5s src/app/actions/__tests__/api-headers.test.ts › should include Content-Type in updateUserById
0.4s src/app/actions/__tests__/api-headers-extended.test.ts › should not include apiKey in updateUserById body
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 valid ETH address
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle invalid ETH address (invalid characters)
0.1s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › Perk claimed shows shake class + go home button
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle maximum length (17 digits) US account
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle too long for US account
📍 Inline annotations are in the **Unit test report** check above. Coverage artifact: `coverage-unit`. Generated by `.github/workflows/tests.yml`.

@coderabbitai coderabbitai Bot added the enhancement New feature or request label Jun 30, 2026
@abalinda

Copy link
Copy Markdown
Contributor Author
image desktop image mobile

might need polishing and a bit more design matching

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/AddMoney/components/__tests__/MantecaPixQrDeposit.test.tsx`:
- Around line 34-35: Remove the obsolete eslint-disable-next-line import/first
suppression from the MantecaPixQrDeposit test file, since that rule is no longer
configured. Keep the existing jest.mock setup and the MantecaPixQrDeposit import
in the same relative order, but delete only the inline lint override near the
test import.

In `@src/components/AddMoney/components/MantecaAddMoney.tsx`:
- Around line 9-10: Remove the unused CountryData import from MantecaAddMoney so
the file no longer trips `@typescript-eslint/no-unused-vars`; keep the used
countryData import and leave the MantecaDepositResponseData and
MantecaPixDepositData type imports unchanged.

In `@src/components/AddMoney/components/MantecaPixQrDeposit.tsx`:
- Around line 20-90: The QR deposit screen only handles the completed state, so
terminal polling results from useMantecaDepositPolling like failed are still
rendered as if the QR is usable. Update MantecaPixQrDeposit to branch on status
for all terminal states returned by the hook, especially failed, and replace the
actionable QR/countdown area with an appropriate failure/terminal message and
navigation action. Keep the existing completed branch, but ensure the fallback
UI no longer shows CopyToClipboard, QRCodeWrapper, or countdown when the deposit
is no longer valid.

In `@src/components/AddMoney/hooks/__tests__/useMantecaDepositPolling.test.tsx`:
- Around line 15-16: The test file’s stale import-order suppression is now
causing lint failures because import/first is no longer configured. Remove the
eslint-disable-next-line comment directly above useMantecaDepositPolling in the
test module, and keep the jest.mock placement as-is so the import remains valid
without the suppression.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 81ba442c-1b4c-4c91-928c-9beca3131c39

📥 Commits

Reviewing files that changed from the base of the PR and between efbb2bd and a9fe6b0.

📒 Files selected for processing (8)
  • src/components/AddMoney/components/MantecaAddMoney.tsx
  • src/components/AddMoney/components/MantecaPixQrDeposit.tsx
  • src/components/AddMoney/components/__tests__/MantecaPixQrDeposit.test.tsx
  • src/components/AddMoney/hooks/__tests__/useMantecaDepositPolling.test.tsx
  • src/components/AddMoney/hooks/useMantecaDepositPolling.ts
  • src/components/Global/QRCodeWrapper/index.tsx
  • src/services/manteca.ts
  • src/types/manteca.types.ts

Comment thread src/components/AddMoney/components/MantecaAddMoney.tsx Outdated
Comment thread src/components/AddMoney/components/MantecaPixQrDeposit.tsx Outdated
Comment on lines +15 to +16
// eslint-disable-next-line import/first -- must come after jest.mock
import { useMantecaDepositPolling } from '../useMantecaDepositPolling'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the stale import/first suppression.

This comment now fails linting because import/first is not configured, so the suppression itself introduces an error.

🧹 Proposed fix
-// eslint-disable-next-line import/first -- must come after jest.mock
 import { useMantecaDepositPolling } from '../useMantecaDepositPolling'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// eslint-disable-next-line import/first -- must come after jest.mock
import { useMantecaDepositPolling } from '../useMantecaDepositPolling'
import { useMantecaDepositPolling } from '../useMantecaDepositPolling'
🧰 Tools
🪛 ESLint

[error] 15-15: Definition for rule 'import/first' was not found.

(import/first)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/AddMoney/hooks/__tests__/useMantecaDepositPolling.test.tsx`
around lines 15 - 16, The test file’s stale import-order suppression is now
causing lint failures because import/first is no longer configured. Remove the
eslint-disable-next-line comment directly above useMantecaDepositPolling in the
test module, and keep the jest.mock placement as-is so the import remains valid
without the suppression.

Source: Linters/SAST tools

…'s details

Drops MantecaPixDepositData; the dynamic QR now reads from the existing
MantecaDepositResponseData.details.qr (the ramp-on synthetic), routed to showQR
by currency. Matches the BE pivot (api #1093) off deposit-request. details.qr is
a stub until Manteca confirms the field name.
@abalinda abalinda changed the title feat(manteca): BRL PIX dynamic-QR deposit screen (FE) [draft, depends on api #1093] feat(manteca): BRL PIX deposit QR screen (ramp-on details.qr) [draft, depends on api#1093] Jun 30, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
src/components/AddMoney/components/MantecaPixQrDeposit.tsx (1)

46-98: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Handle the hook's failed terminal state before rendering the QR.

Line 46 only short-circuits 'completed', but useMantecaDepositPolling also returns 'failed' for terminal backend states. In those cases, Lines 73-97 still show the QR/copy flow and keep the countdown running even though the deposit is no longer payable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/AddMoney/components/MantecaPixQrDeposit.tsx` around lines 46 -
98, The Manteca PIX deposit UI only handles the terminal "completed" status, but
`useMantecaDepositPolling` can also return a terminal "failed" state, so
`MantecaPixQrDeposit` should stop rendering the QR/countdown flow for failures
too. Update the status handling near the existing `status === 'completed'`
branch to also cover `failed` in `MantecaPixQrDeposit`, and show an appropriate
terminal/error state or redirect action instead of rendering `QRCodeWrapper`,
`CopyToClipboard`, and the countdown when the backend says the deposit is no
longer payable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/AddMoney/components/MantecaAddMoney.tsx`:
- Around line 198-205: The BRL branch in MantecaAddMoney currently routes all
deposits to showQR based only on selectedCountry?.currency, but the QR payload
is optional and can be missing from the create-deposit response. Update the
logic around setDepositDetails and setUrlState so it checks the returned deposit
data for a valid QR payload before choosing the showQR step, and otherwise falls
back to depositDetails. Use the existing MantecaAddMoney and MantecaPixQrDeposit
flow to ensure users are not sent to the QR screen when details.qr is absent.

---

Duplicate comments:
In `@src/components/AddMoney/components/MantecaPixQrDeposit.tsx`:
- Around line 46-98: The Manteca PIX deposit UI only handles the terminal
"completed" status, but `useMantecaDepositPolling` can also return a terminal
"failed" state, so `MantecaPixQrDeposit` should stop rendering the QR/countdown
flow for failures too. Update the status handling near the existing `status ===
'completed'` branch to also cover `failed` in `MantecaPixQrDeposit`, and show an
appropriate terminal/error state or redirect action instead of rendering
`QRCodeWrapper`, `CopyToClipboard`, and the countdown when the backend says the
deposit is no longer payable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3d72af46-6636-403c-9bc0-0d5fd477960f

📥 Commits

Reviewing files that changed from the base of the PR and between a9fe6b0 and 911fb36.

📒 Files selected for processing (5)
  • src/components/AddMoney/components/MantecaAddMoney.tsx
  • src/components/AddMoney/components/MantecaPixQrDeposit.tsx
  • src/components/AddMoney/components/__tests__/MantecaPixQrDeposit.test.tsx
  • src/services/manteca.ts
  • src/types/manteca.types.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/AddMoney/components/tests/MantecaPixQrDeposit.test.tsx

Comment on lines +198 to +205
// BRL deposits carry the dynamic PIX QR in the ramp-on synthetic's
// details → show the QR step. ARS/others show deposit details.
const data = depositData.data
setDepositDetails(data)
if (selectedCountry?.currency === 'BRL') {
setUrlState({ step: 'showQR' })
} else {
setUrlState({ step: 'depositDetails' })

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Gate showQR on the returned QR payload, not just the selected currency.

Line 202 sends every BRL deposit to the QR step, but details.qr is optional and MantecaPixQrDeposit never refreshes depositDetails. If the create-deposit response comes back without a QR payload, the user lands on a permanent “Preparing your PIX QR…” screen instead of falling back to deposit details.

🛠️ Suggested fix
             const data = depositData.data
             setDepositDetails(data)
-            if (selectedCountry?.currency === 'BRL') {
+            if (selectedCountry?.currency === 'BRL' && data?.details.qr) {
                 setUrlState({ step: 'showQR' })
             } else {
                 setUrlState({ step: 'depositDetails' })
             }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// BRL deposits carry the dynamic PIX QR in the ramp-on synthetic's
// details → show the QR step. ARS/others show deposit details.
const data = depositData.data
setDepositDetails(data)
if (selectedCountry?.currency === 'BRL') {
setUrlState({ step: 'showQR' })
} else {
setUrlState({ step: 'depositDetails' })
// BRL deposits carry the dynamic PIX QR in the ramp-on synthetic's
// details → show the QR step. ARS/others show deposit details.
const data = depositData.data
setDepositDetails(data)
if (selectedCountry?.currency === 'BRL' && data?.details.qr) {
setUrlState({ step: 'showQR' })
} else {
setUrlState({ step: 'depositDetails' })
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/AddMoney/components/MantecaAddMoney.tsx` around lines 198 -
205, The BRL branch in MantecaAddMoney currently routes all deposits to showQR
based only on selectedCountry?.currency, but the QR payload is optional and can
be missing from the create-deposit response. Update the logic around
setDepositDetails and setUrlState so it checks the returned deposit data for a
valid QR payload before choosing the showQR step, and otherwise falls back to
depositDetails. Use the existing MantecaAddMoney and MantecaPixQrDeposit flow to
ensure users are not sent to the QR screen when details.qr is absent.

…g screen

Two PIX-deposit polish items:
- Add money → Brazil now defaults the input denomination to BRL (Argentina → ARS)
  instead of USD — you deposit in your local currency.
- Show the branded CyclingLoading screen (spinning peanut + rotating messages,
  same as PIX-payment processing) while the BRL QR is being generated, and in
  place of the plain "Preparing your PIX QR…" fallback.
…lement screen

- Add money → Brazil defaults the denomination to BRL (PIX is in BRL); every
  other country keeps USD (Argentina reverts to USD).
- useMantecaDepositPolling now surfaces a 'processing' status for the
  payment-settling window (Manteca PROCESSING / AWAITING_SETTLEMENT); the QR
  screen shows the branded CyclingLoading during it, so the flow is
  QR → processing → "Deposit received!".
For Brazil, the shared "From Bank" (bank-transfer-add) method resolves to the
same Manteca route as the "Pix" card (/add-money/brazil/manteca), so it's a pure
duplicate. Filter it out for BR so Brazil shows only Pix (+ From Crypto). Every
other country keeps its "From Bank" card. Reversible: delete the one filter block.
@abalinda

abalinda commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

removed the "From Bank" as its a dead end - same as PIX and not enabled

image

@jjramirezn

Copy link
Copy Markdown
Contributor

Superseded by #2335 — same work rebased onto main + wired to the prod-confirmed contract (QR at details.depositAddresses.PIX, live since today). Targeting main because the current BRL deposit screen has nothing to pay (Manteca stopped returning the static key).

@jjramirezn jjramirezn closed this Jul 2, 2026
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