refactor: remove StartVerificationView interstitial#2410
Conversation
Every KYC entry point except the card flow and first-time region KYC already skipped this screen via autoStart/skipStartView — and in both remaining flows the user had just tapped an explicit CTA, making it a redundant double-consent step. The Sumsub SDK never needed it: it inits off token + container, proven by the autoStart paths in prod. Also unifies the exit-confirmation copy on the 'Exit for now?' variant; the 'start again from scratch' copy was wrong anyway (Sumsub persists applicant progress).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe KYC flow now starts directly when its SDK prerequisites are ready. Separate verification start views and ChangesKYC flow simplification
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
Code-analysis diffPainscore total: 6128.22 → 6121.26 (-6.96) 🆕 New findings (29)
…and 9 more. ✅ Resolved (30)
…and 10 more. 📈 Painscore deltas (top movers)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
- Script-load effect keyed on window.snsWebSdk, not script-tag existence: a second wrapper instance could mark the SDK loaded while a sibling's script was still downloading, then init against undefined (blank modal). - Init failure now flips sdkLoadError so the user gets the error UI + Close instead of an empty panel. - Spinner behind the SDK container while the Sumsub iframe boots. - IframeWrapper (Bridge ToS surfaces) gets honest exit copy — nothing is 'saved' by closing an unaccepted ToS. - Drop the reset-effect destroy block made redundant by visible being an init-effect dep; reword a cardApply.utils.ts comment that referenced the deleted interstitial.
|
Superseded by #2411 — the signed-commits ruleset rejects any update to this branch that carries dev's unsigned mobile-release commits (GH013), so the dev merge + conflict resolution had to land on a fresh branch. Closing. |
Summary
Removes the
StartVerificationViewinterstitial ("Secure Verification. Limited Data Use.") for good.Why: the Sumsub SDK never needed it — it inits off token + container. 6 of 8 KYC entry points already skipped it via
autoStart/autoStartSdk/skipStartView(qr-pay, withdraw/manteca, limits, KYC drawer, add-money bank, Bridge ToS iframes). The two flows that still showed it — card application and first-time region KYC — both open it immediately after the user tapped an explicit CTA (Apply / "Verify now"), making it a redundant double-consent screen. The copy inIframeWrapperwas fully dead code (both consumers passedskipStartView).With the interstitial gone, the skip-flags (
autoStart,autoStartSdk,skipStartView) have no job left, so they're deleted across all call sites;UnlockedRegions' resubmit-vs-start split collapses into one handler.Exit-confirmation copy unified: Sumsub surfaces say "Exit for now? …your progress is saved." (accurate — Sumsub persists applicant progress; the old "start again from scratch" copy was wrong). Bridge ToS surfaces (
IframeWrapper) say "You can come back and finish this anytime." (nothing is "saved" by closing an unaccepted ToS).Hardening that fell out of
/code-review high(second commit):window.snsWebSdk, not script-tag existence — with two wrapper instances mounted, the second could treat a still-downloading sibling script as loaded and init againstundefined(blank modal). Load/error listeners attach to the existing tag instead.sdkLoadError) instead of leaving a blank panel.115 insertions, 213 deletions.
Design notes / accepted trade-offs
SumsubKycWrapperandIframeWrapper. Copies now intentionally differ per surface, so no shared helper was extracted. The broader help/exit ActionModal duplication (~80 lines) predates this PR — follow-up candidate.Risks / breaking changes
autoStartinit path (SDK inits whenvisible && accessToken && sdkLoaded) — no new init logic beyond the script-readiness fix above.QA
ci-success). eslint is the known repo-wide advisory red — changed files verified 0 new errors.