Skip to content

feat(card): integrate Veriff native SDK with MetaMask branding for KYC verification#26138

Merged
Brunonascdev merged 14 commits intomainfrom
feat/mm-card-veriff-sdk
Feb 19, 2026
Merged

feat(card): integrate Veriff native SDK with MetaMask branding for KYC verification#26138
Brunonascdev merged 14 commits intomainfrom
feat/mm-card-veriff-sdk

Conversation

@Brunonascdev
Copy link
Copy Markdown
Contributor

@Brunonascdev Brunonascdev commented Feb 16, 2026

Description

This PR integrates the Veriff native SDK directly into the Card onboarding flow, replacing the previous KYCWebview approach. Instead of navigating to a separate webview screen to launch Veriff, the SDK is now invoked natively from the VerifyIdentity component. 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:

  • Replaced webview-based Veriff flow with native SDK: The KYCWebview component and its route have been removed. VerifyIdentity now directly calls VeriffSdk.launchVeriff() and handles statusDone, statusCanceled, and statusError results.
  • MetaMask-branded Veriff SDK: The SDK is fully customized to match MetaMask's design system — background, text, button, and accent colors adapt dynamically to light/dark theme via useTheme(). Camera overlay colors are pinned to static dark+white values (the SDK applies 90% opacity over the camera feed). Buttons match MetaMask's ButtonPrimary style (icon.default/icon.inverse). Custom Geist fonts and the MetaMask fox logo are applied.
  • iOS fox logo asset: A new fox.imageset was added to Images.xcassets (1x/2x/3x PNGs) so the Veriff SDK can display the MetaMask fox logo via native asset name on iOS.
  • Android build configuration: Added the Veriff Maven repository. The project's minSdkVersion remains at 24; Veriff's sub-libraries require API 26, which is handled via a Gradle doFirst task that patches the extracted Veriff AAR manifests before the manifest merge (the standard tools:overrideLibrary approach conflicts with AGP's auto-generated <uses-sdk>). Also resolved BouncyCastle duplicate class conflicts via dependencySubstitution and excluded a conflicting OSGI manifest entry.
  • TypeScript declarations: Added type definitions for @veriff/react-native-sdk including VeriffBranding, VeriffConfig, VeriffResult, and font config interfaces.
  • Jest configuration: Added @veriff/react-native-sdk to transformIgnorePatterns so the ESM package is transpiled during tests.
  • Tests updated: VerifyIdentity.test.tsx was rewritten to test the native SDK launch, branding structure, and status handling. KYCWebview.test.tsx was removed. OnboardingNavigator tests 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

Feature: Veriff SDK native integration for Card KYC

  Scenario: User launches KYC verification in light mode
    Given the user is on the Card onboarding "Verify Identity" screen
    And the app is in light mode

    When the user taps the "Continue" button
    Then the Veriff SDK opens natively with MetaMask branding
    And the background is white with dark text
    And the buttons are dark (matching MetaMask ButtonPrimary style)
    And the MetaMask fox logo is displayed at the top
    And the illustrations are visible with blue accent tint

  Scenario: User launches KYC verification in dark mode
    Given the user is on the Card onboarding "Verify Identity" screen
    And the app is in dark mode

    When the user taps the "Continue" button
    Then the Veriff SDK opens natively with MetaMask branding
    And the background is dark with white text
    And the buttons are white (matching MetaMask ButtonPrimary dark style)
    And the camera overlay text is readable (white text on dark overlay)
    And the illustrations are visible with blue accent tint

  Scenario: User completes Veriff verification successfully
    Given the Veriff SDK is open

    When the user completes the identity verification flow
    Then the Veriff SDK returns statusDone
    And the user is navigated to the "Verifying KYC" screen

  Scenario: User cancels Veriff verification
    Given the Veriff SDK is open

    When the user cancels or closes the Veriff flow
    Then the Veriff SDK returns statusCanceled
    And the user remains on the "Verify Identity" screen

  Scenario: Veriff verification encounters an error
    Given the Veriff SDK is open

    When the verification fails with an error
    Then the error is logged via Logger
    And the user remains on the "Verify Identity" screen

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

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-sdk from VerifyIdentity, 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 a fox asset and pods are updated to include Veriff.

Written by Cursor Bugbot for commit d9416c8. This will update automatically on new commits. Configure here.

@Brunonascdev Brunonascdev self-assigned this Feb 16, 2026
@Brunonascdev Brunonascdev requested review from a team as code owners February 16, 2026 21:07
@github-actions
Copy link
Copy Markdown
Contributor

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.

@metamaskbot metamaskbot added the team-card Card Team label Feb 16, 2026
@socket-security
Copy link
Copy Markdown

socket-security bot commented Feb 16, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​veriff/​react-native-sdk@​11.2.0831007593100

View full report

klejeune
klejeune previously approved these changes Feb 18, 2026
Copy link
Copy Markdown
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

left some comments

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeCard
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
This PR integrates the Veriff native SDK for KYC verification in the MetaMask Card onboarding flow, replacing the previous WebView-based approach. The changes are well-scoped to the Card feature:

  1. New Dependency: Added @veriff/react-native-sdk (v11.2.0) for native identity verification
  2. Removed WebView KYC: Deleted KYCWebview.tsx component and its navigation route
  3. Native SDK Integration: Modified VerifyIdentity.tsx to launch Veriff SDK natively with theme-aware branding
  4. iOS Assets: Added fox logo images for Veriff SDK branding
  5. Android Build Config: Added Veriff Maven repository and resolved BouncyCastle library conflicts
  6. Navigation Updates: Removed CardOnboardingWebview route from navigation types and Routes constants
  7. Type Declarations: Added TypeScript declarations for the Veriff SDK
  8. Jest Config: Updated transform ignore patterns for the new SDK

The changes are isolated to the Card KYC onboarding flow and don't affect:

  • Core wallet functionality or Engine
  • Transaction confirmations (Card KYC is separate from transaction flows)
  • Network management or multi-chain features
  • Trading features (swaps, bridges, perps, predictions)
  • Account management or identity sync
  • Browser or dApp connections

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:
This PR changes the Card KYC onboarding flow by replacing a WebView with a native Veriff SDK. The changes don't affect: (1) UI rendering performance of core wallet components, (2) Account/network list rendering, (3) Data loading or state management patterns, (4) App startup or initialization, (5) Critical user flows like login, balance loading, swaps, or sends. The Veriff SDK is launched as an external native module for identity verification, which is a one-time onboarding step and not part of the regular app performance-critical paths. No performance tests are needed.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM

@Brunonascdev Brunonascdev added this pull request to the merge queue Feb 19, 2026
Merged via the queue into main with commit 69538b5 Feb 19, 2026
89 checks passed
@Brunonascdev Brunonascdev deleted the feat/mm-card-veriff-sdk branch February 19, 2026 16:47
@github-actions github-actions bot locked and limited conversation to collaborators Feb 19, 2026
@metamaskbot metamaskbot added the release-7.67.0 Issue or pull request that will be included in release 7.67.0 label Feb 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.67.0 Issue or pull request that will be included in release 7.67.0 size-L team-card Card Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants