fix(manteca): PIX QR no longer vanishes — settling gates on stage, not PROCESSING#2337
Conversation
…t PROCESSING Manteca flips a ramp-on to ACTIVE (→ intent PROCESSING) seconds after creation, while the user hasn't paid. The polling hook read PROCESSING as 'payment detected' and swapped the QR for a permanent CyclingLoading — the reported 'QR shows, then loads again, and it's lost'. The BE status endpoint now returns the synthetic stage (api#1112); the settling screen only shows once stage >= 2 (fiat actually received). Absent/null stage (older BE, legacy row) degrades to keeping the QR visible.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThe Manteca deposit polling hook now determines "processing" status based on a numeric synthetic ChangesStage-based deposit status
Estimated code review effort: 2 (Simple) | ~10 minutes Related PRs: None specified Suggested labels: bug-fix, add-money, manteca Suggested reviewers: None specified Poem: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
Code-analysis diffPainscore total: 5840.45 → 5840.84 (+0.39) 🆕 New findings (5)
✅ Resolved (4)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
Fix: PIX QR vanishes into a permanent loader (state-machine bug from #2335)
Bug (reported by Jota testing prod): QR renders, then the screen flips back to a loader and the QR is lost — before the user can pay.
Root cause: Manteca flips a ramp-on synthetic to
ACTIVEseconds after creation ("QR live, awaiting fiat" — nobody paid).ACTIVEmaps to intentPROCESSINGon the BE, anduseMantecaDepositPollingtreatedPROCESSINGas "payment detected, settling" → the next 5s poll swapped the QR forCyclingLoading, permanently.Fix: the settling screen now gates on the synthetic stage returned by
GET /manteca/deposit/:id/status(api#1112): stage 1 = QR stays visible; stage ≥ 2 = fiat received → settling;COMPLETED→ success. A missing/nullstage (older BE, legacy intent) degrades to keeping the QR visible — never stranding the user on a loader — so deploy order vs api#1112 is flexible (BE-first still preferred; until it deploys, the interstitial simply doesn't appear).Tests: hook — the regression case (
PROCESSING+ stage 1 →pending), stage ≥ 2 →processing,stage: nulldegrade, plus the existing completed/failed/no-id cases. Full suite 1659/1663 (1 pre-existing main failure:add-money-states › loaded EVM deposit, unrelated; 3 skipped).Cross-repo: companion BE peanutprotocol/peanut-api-ts#1112.
🤖 Generated with Claude Code