Skip to content

Rename KYC references to be platform agnostic#1947

Merged
transphorm merged 4 commits intodevfrom
justin/self-2585-update-kyc-surface-areas
Apr 8, 2026
Merged

Rename KYC references to be platform agnostic#1947
transphorm merged 4 commits intodevfrom
justin/self-2585-update-kyc-surface-areas

Conversation

@transphorm
Copy link
Copy Markdown
Member

@transphorm transphorm commented Apr 8, 2026

Summary

  • Renames provider-agnostic Didit surface areas (hooks, services, integrations, utils) to generic kyc naming across the RN app and WebView, keeping Didit naming only where it directly wraps the vendor SDK
  • Removes residual Sumsub references from Android manifests, Solidity comments, docs, and CLAUDE.md
  • Updates error injection store, console log prefixes, and error messages to use kyc instead of didit/Sumsub

Changes

React Native app

  • Renamed app/src/integrations/didit/kyc/ (service, types, index)
  • Renamed useDiditLauncheruseKycLauncher, useDiditWebSocketuseKycWebSocket
  • Updated all call sites: fallback screens, LogoConfirmationScreen, KycSuccessScreen, selfClientProvider, usePendingKycRecovery
  • Renamed error injection keys from didit_* to kyc_* with updated labels and log prefixes

WebView app

  • Renamed diditProvider.tskycProvider.ts, diditAttestation.tskycAttestation.ts
  • Updated ProviderLaunchScreen imports and container/fallback IDs
  • Made session error messages provider-agnostic ("KYC session" instead of "Didit session")

Common/shared

  • Updated PendingKycStatus comments in common/src/utils/types.ts from "didit" to "KYC"

Contracts

  • Updated AttestationId.sol comments to remove Sumsub reference

Docs/config

  • Updated Android manifests (debug + main) to say "KYC SDK" instead of "Sumsub SDK"
  • Updated CLAUDE.md and spec-from-audit/SKILL.md example file paths
  • Updated purple/ docs and tech-debt-baseline.json to reflect Didit provider
  • Updated navigation test comment

Linear Issues

  • Closes SELF-2585 — Remove all Sumsub references & abstract Didit to generic KYC naming

Test Plan

  • cd app && yarn types
  • cd packages/webview-app && yarn build
  • cd packages/mobile-sdk-alpha && yarn test
  • Targeted tests pass: usePendingKycRecovery.test.ts, KycSuccessScreen.test.tsx
  • Verify no remaining generic didit references outside vendor-specific code: rg -i '\bdidit\b' --type-not lock -g '*.{ts,tsx}' | grep -v '@didit-protocol\|verify\.didit\.me\|DIDIT_HOST\|DIDIT_TEE_URL\|DiditSdk\|provider.*didit\|didit-tee'

Native Consolidation Checklist

  • CONTRACTS.md reviewed - no unintended contract changes
  • Layer 1 bridge contract tests pass (cd app && yarn jest:run / yarn workspace @selfxyz/rn-sdk-test-app test)
  • Layer 3 builds pass (app iOS, RN test app iOS, RN test app Android)
  • Layer 4 manual smoke test signed off (if consolidation PR)
  • No new native business logic added (logic belongs in TypeScript)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated KYC provider references and authentication docs to reflect the new KYC provider naming.
  • Chores

    • Switched verification integration and test/config wiring from the previous provider to the KYC integration.
    • Updated runtime labels and error injection options to reference KYC, and adjusted related test mocks.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 8, 2026

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

Project Deployment Actions Updated (UTC)
self-webview-app Ready Ready Preview, Comment Apr 8, 2026 11:42pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 8, 2026

📝 Walkthrough

Walkthrough

Renames and re-exports migrate a Didit-centric KYC integration to KYC-branded APIs across mobile and web: hooks, service APIs, types, tests, logs, error-injection keys, docs, and manifest comments. Control flow and functionality remain unchanged.

Changes

Cohort / File(s) Summary
Docs & Comments
/.claude/skills/spec-from-audit/SKILL.md, CLAUDE.md, purple/global/*, purple/temp/codebase-analysis.md, docs/maintenance/tech-debt-baseline.json, contracts/contracts/constants/AttestationId.sol
Updated documentation, example paths, and NatSpec comments to reflect KYC/Didit provider attribution and a dependency baseline swap (@sumsub removed, @didit-protocol added).
Android Manifests
app/android/app/src/debug/AndroidManifest.xml, app/android/app/src/main/AndroidManifest.xml
Changed inline comments attributing ML Kit/permission rationale to the KYC SDK; no manifest attributes or runtime configuration altered.
Mobile KYC Hooks & WebSockets
app/src/hooks/useKycLauncher.ts, app/src/hooks/useKycWebSocket.ts, app/src/hooks/usePendingKycRecovery.ts
Renamed hooks and option interfaces from Didit→Kyc, swapped imported types and log prefixes, and wired calls to new KYC session/launch APIs; control flow unchanged.
Mobile Integration Service & Types
app/src/integrations/kyc/index.ts, app/src/integrations/kyc/kycService.ts, app/src/integrations/kyc/types.ts
Replaced exported names and re-export paths: DiditVerificationResultKycVerificationResult, DiditConfigKycLaunchConfig, createSessioncreateKycSession, launchDiditlaunchKycVerification.
Mobile Providers, Screens & Stores
app/src/providers/selfClientProvider.tsx, app/src/screens/... (multiple), app/src/screens/kyc/KycSuccessScreen.tsx, app/src/screens/documents/selection/LogoConfirmationScreen.tsx, app/src/stores/errorInjectionStore.ts
Swapped Didit→KYC hook usages and launch calls across many screens, updated log labels and injected error keys (didit_*kyc_*), preserved navigation/state logic.
Mobile Types & Utils
common/src/utils/types.ts
Adjusted inline status comments to reference "KYC verification" wording; no type signatures changed.
Webview App: KYC Provider & Attestation
packages/webview-app/src/utils/kycProvider.ts, packages/webview-app/src/utils/kycAttestation.ts, packages/webview-app/src/screens/onboarding/ProviderLaunchScreen.tsx
Renamed types and functions from Didit→Kyc (DiditSessionKycSession, createDiditSessioncreateKycSession, launchDiditWebSdklaunchKycWebSdk, waitForAttestationwaitForKycAttestation), updated SDK container id and verificationId prefix; behavior preserved.
Tests
app/tests/src/hooks/usePendingKycRecovery.test.ts, app/tests/src/navigation.test.tsx, app/tests/src/screens/kyc/KycSuccessScreen.test.tsx
Updated Jest mocks and comments to reference useKycWebSocket/KYC SDK; mock shapes retained and assertions unchanged.
Formatting / Specs
specs/projects/.../SPEC.md
Markdown table spacing/alignment adjustments in spec docs; no semantics changed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Rename KYC references to be platform agnostic' directly and accurately summarizes the main change: renaming Didit-specific references to generic KYC naming across the codebase.
Description check ✅ Passed The description is comprehensive and well-structured with summary, detailed changes by area, linear issue reference, test plan with executed steps, and native checklist. All required information is present and clear.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch justin/self-2585-update-kyc-surface-areas

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 and usage tips.

@transphorm transphorm changed the title Justin/self 2585 update kyc surface areas Rename Didit references to generic KYC naming and remove Sumsub remnants Apr 8, 2026
@transphorm transphorm changed the title Rename Didit references to generic KYC naming and remove Sumsub remnants Rename KYC references to be platform agnostic Apr 8, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: eb2de95b-edca-4c9e-a248-167f8c5fb448

📥 Commits

Reviewing files that changed from the base of the PR and between 77df53b and 69f9446.

📒 Files selected for processing (31)
  • .claude/skills/spec-from-audit/SKILL.md
  • CLAUDE.md
  • app/android/app/src/debug/AndroidManifest.xml
  • app/android/app/src/main/AndroidManifest.xml
  • app/src/hooks/useKycLauncher.ts
  • app/src/hooks/useKycWebSocket.ts
  • app/src/hooks/usePendingKycRecovery.ts
  • app/src/integrations/kyc/index.ts
  • app/src/integrations/kyc/kycService.ts
  • app/src/integrations/kyc/types.ts
  • app/src/providers/selfClientProvider.tsx
  • app/src/screens/documents/aadhaar/AadhaarUploadErrorScreen.tsx
  • app/src/screens/documents/scanning/DocumentCameraTroubleScreen.tsx
  • app/src/screens/documents/scanning/DocumentNFCTroubleScreen.tsx
  • app/src/screens/documents/scanning/RegistrationFallbackMRZScreen.tsx
  • app/src/screens/documents/scanning/RegistrationFallbackNFCScreen.tsx
  • app/src/screens/documents/selection/LogoConfirmationScreen.tsx
  • app/src/screens/kyc/KycSuccessScreen.tsx
  • app/src/stores/errorInjectionStore.ts
  • app/tests/src/hooks/usePendingKycRecovery.test.ts
  • app/tests/src/navigation.test.tsx
  • app/tests/src/screens/kyc/KycSuccessScreen.test.tsx
  • common/src/utils/types.ts
  • contracts/contracts/constants/AttestationId.sol
  • docs/maintenance/tech-debt-baseline.json
  • packages/webview-app/src/screens/onboarding/ProviderLaunchScreen.tsx
  • packages/webview-app/src/utils/kycAttestation.ts
  • packages/webview-app/src/utils/kycProvider.ts
  • purple/global/authentication.md
  • purple/global/external-services.md
  • purple/temp/codebase-analysis.md

Comment thread app/src/hooks/useKycWebSocket.ts
Comment thread app/src/providers/selfClientProvider.tsx Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 04c0eaf6-4fd9-4af8-b116-726ca35e1267

📥 Commits

Reviewing files that changed from the base of the PR and between 69f9446 and ca9487a.

📒 Files selected for processing (7)
  • app/src/hooks/useKycWebSocket.ts
  • app/src/providers/selfClientProvider.tsx
  • packages/webview-app/src/screens/onboarding/ProviderLaunchScreen.tsx
  • packages/webview-app/src/utils/kycAttestation.ts
  • packages/webview-app/src/utils/kycProvider.ts
  • specs/projects/sdk/workstreams/kmp-revival/SPEC.md
  • specs/projects/sdk/workstreams/sdk-distribution/SPEC.md
✅ Files skipped from review due to trivial changes (3)
  • specs/projects/sdk/workstreams/kmp-revival/SPEC.md
  • specs/projects/sdk/workstreams/sdk-distribution/SPEC.md
  • packages/webview-app/src/screens/onboarding/ProviderLaunchScreen.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/webview-app/src/utils/kycAttestation.ts
  • app/src/providers/selfClientProvider.tsx
  • app/src/hooks/useKycWebSocket.ts

Comment thread packages/webview-app/src/utils/kycProvider.ts
@transphorm transphorm merged commit 3e714fa into dev Apr 8, 2026
43 checks passed
@transphorm transphorm deleted the justin/self-2585-update-kyc-surface-areas branch April 8, 2026 23:56
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.

1 participant