fix(home): activation-rejection CTA respects users who can already transact#2351
Conversation
…ansact The provider-rejection override showed 'Complete your setup / Upload document' (or 'Verification issue') to any Sumsub-approved user with a rejected bank/qr rail — even card-holders and already-activated users, who already have a working way to transact and don't need the bank rail. Gate the override on !canAlreadyTransact (any enabled rail — the card's rail reads enabled — or BE isActivated). A genuinely-fixable bank RFI still surfaces in context in the /add-money bank flow.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 47 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Comment |
Code-analysis diffPainscore total: 5885.18 → 5885.24 (+0.06) 🆕 New findings (2)
✅ Resolved (2)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
The home activation-rejection override (
ActivationCTAs) showed "Complete your setup → Upload document" (fixable) or "Verification issue" (blocked) to any Sumsub-approved user with a rejected bank/qr rail — even users who already hold an active card or another enabled rail, or whom the BE has markedisActivated. For a card-holder that's a nag on an optional capability they don't need (and, for a terminally-rejected bank rail, can't fix).Gate the override on
!canAlreadyTransact, wherecanAlreadyTransact = rails.some(status === 'enabled') || user.isActivated. The card's own rail readsenabled, so a card-holder is covered. A genuinely-fixable bank RFI is unaffected on the home screen only — it still surfaces in context in the/add-money/[country]/bankflow, which runs its own capability gate.Risk
Low. One added boolean guard on an existing memo; the fixable/blocked branches themselves are untouched. Covered by new tests.
Cross-repo
Pairs with the peanut-api-ts hotfix terminal Bridge → blocked (peanutprotocol/peanut-api-ts #1132). Independent — either can ship first. The API fix flips a terminal user from the "fixable/upload" card to the "blocked/contact-support" card; this FE fix suppresses both for users who can already transact.
QA
npm test— newsrc/components/Home/__tests__/ActivationCTAs.test.tsx: