feat(card): integrate Veriff native SDK with MetaMask branding for KYC verification#26138
feat(card): integrate Veriff native SDK with MetaMask branding for KYC verification#26138Brunonascdev merged 14 commits intomainfrom
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
…mm-card-veriff-sdk
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The changes are isolated to the Card KYC onboarding flow and don't affect:
SmokeCard is the appropriate tag as it tests the Card feature including onboarding flows. While the tag description mentions selecting SmokeTrade and SmokeConfirmations for Add Funds flows, this PR specifically changes the KYC verification step which occurs before any funding operations. Performance Test Selection: |
|



Description
This PR integrates the Veriff native SDK directly into the Card onboarding flow, replacing the previous
KYCWebviewapproach. Instead of navigating to a separate webview screen to launch Veriff, the SDK is now invoked natively from theVerifyIdentitycomponent. This provides a better user experience (native UI instead of a webview), more reliable KYC session handling, and full visual customization to match MetaMask's branding.Key changes:
KYCWebviewcomponent and its route have been removed.VerifyIdentitynow directly callsVeriffSdk.launchVeriff()and handlesstatusDone,statusCanceled, andstatusErrorresults.useTheme(). Camera overlay colors are pinned to static dark+white values (the SDK applies 90% opacity over the camera feed). Buttons match MetaMask'sButtonPrimarystyle (icon.default/icon.inverse). Custom Geist fonts and the MetaMask fox logo are applied.fox.imagesetwas added toImages.xcassets(1x/2x/3x PNGs) so the Veriff SDK can display the MetaMask fox logo via native asset name on iOS.minSdkVersionremains at 24; Veriff's sub-libraries require API 26, which is handled via a GradledoFirsttask that patches the extracted Veriff AAR manifests before the manifest merge (the standardtools:overrideLibraryapproach conflicts with AGP's auto-generated<uses-sdk>). Also resolved BouncyCastle duplicate class conflicts viadependencySubstitutionand excluded a conflicting OSGI manifest entry.@veriff/react-native-sdkincludingVeriffBranding,VeriffConfig,VeriffResult, and font config interfaces.@veriff/react-native-sdktotransformIgnorePatternsso the ESM package is transpiled during tests.VerifyIdentity.test.tsxwas rewritten to test the native SDK launch, branding structure, and status handling.KYCWebview.test.tsxwas removed.OnboardingNavigatortests were updated to remove the deleted webview route.Changelog
CHANGELOG entry: Replaced webview-based Veriff KYC flow with native Veriff SDK integration, featuring MetaMask-branded UI with dynamic light/dark theme support, custom fonts, and fox logo
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
High Risk
Touches a critical identity/KYC flow and introduces a new native third-party SDK with non-trivial Android build-time patching and dependency resolution, increasing risk of build/runtime integration issues across platforms.
Overview
Card onboarding KYC now launches Veriff via the native
@veriff/react-native-sdkfromVerifyIdentity, including theme-driven MetaMask branding (colors/fonts/logo), explicit handling of done/canceled/error outcomes, and a loading/disabled state while the SDK is launching.The legacy webview-based KYC screen/route/param types are removed (
KYCWebview,Routes.CARD.ONBOARDING.WEBVIEW, and navigation param typings), and unit tests are updated accordingly (new SDK/status assertions; webview tests deleted).Mobile build tooling is extended to support Veriff: adds the Veriff Android Maven repo, resolves Android packaging/dependency conflicts (BouncyCastle substitution + excludes) and patches Veriff AAR manifests to match the app
minSdkVersion; iOS adds afoxasset and pods are updated to include Veriff.Written by Cursor Bugbot for commit d9416c8. This will update automatically on new commits. Configure here.