Skip to content

Mayank/feat/rain va - #2092

Merged
MayankMittal1 merged 6 commits into
masterfrom
mayank/feat/rain-va
Jun 8, 2026
Merged

Mayank/feat/rain va#2092
MayankMittal1 merged 6 commits into
masterfrom
mayank/feat/rain-va

Conversation

@MayankMittal1

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented May 25, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
solid-app Ignored Ignored Preview Jun 8, 2026 12:52pm
solid-app-staging Ignored Ignored Preview Jun 8, 2026 12:52pm

Request Review

Copy link
Copy Markdown
Contributor

🟠 kycFlow is persisted and never cleared — can strand card users on the pending page

kycFlow lives in the persisted (mmkv) KYC store, and clearKycFlow is defined but never called anywhere. The three KYC entrypoints don't all normalize it:

Entry Sets kycFlow?
hooks/useCardSteps/useCardSteps.ts:123/128 (Rain card) 'card'
components/DepositOption/VirtualAccountDetails/VirtualAccountApplyModal.tsx:34 (VA) 'va'
app/(protected)/(tabs)/user-kyc-info.tsx:42 (Rain redirect) ❌ leaves it stale

Because Didit KYC is shared between the VA and card flows, a stale 'va' can break the existing card flow:

  1. User opens VA → completes Didit → kycFlow = 'va' (sticky, never cleared).
  2. That same KYC approval also satisfies the card, so a later card attempt may skip useCardSteps' setKycFlow('card').
  3. On /card/pending, if (kycFlow === 'va') return; (app/(protected)/(tabs)/card/pending.tsx:25) short-circuits the entire auto-routing — no redirect to CARD_READY / CARD_DETAILS / CARD_ACTIVATE. The 5s poll never advances them, so they're stuck on "Thank you for your submission!" even after the card is ready.

The same stale flag makes components/kyc/useDiditSession.ts:77 force CARD_PENDING instead of the correct card destination.

Suggested fix: clear/normalize kycFlow at the start of the card flow (or on card-pending mount), set it on the user-kyc-info redirect, and/or call clearKycFlow() once it's been consumed. Alternatively, scope the 'va' early-return to "no card yet" so it can't strand users who already have a card.


Generated by Claude Code

@MayankMittal1
MayankMittal1 merged commit 5f9ca5c into master Jun 8, 2026
3 of 5 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