Skip to content

feat(card): add push provisioning base infrastructure#25669

Merged
Brunonascdev merged 9 commits intomainfrom
feat/card-push-provisioning-base
Feb 5, 2026
Merged

feat(card): add push provisioning base infrastructure#25669
Brunonascdev merged 9 commits intomainfrom
feat/card-push-provisioning-base

Conversation

@Brunonascdev
Copy link
Copy Markdown
Contributor

@Brunonascdev Brunonascdev commented Feb 4, 2026

Description

Add the shared infrastructure for push provisioning cards to mobile wallets. This base branch contains:

  • Core hook (usePushProvisioning) and service (PushProvisioningService)
  • Card provider adapters (GalileoCardAdapter for US users)
  • Base wallet adapter interfaces and utilities
  • Feature flag selectors for both platforms
  • CardHome and ReviewOrder UI integration
  • Localization strings and analytics events

Platform-specific implementations (GoogleWalletAdapter, AppleWalletAdapter) are added in separate branches:

  • feat/google-in-app-provisioning
  • feat/apple-in-app-provisioning

Changelog

CHANGELOG entry: Base setup for in-app provisioning

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

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

Medium Risk
Touches core card UX and adds new network endpoints plus a new adapter/service stack that coordinates with native wallet SDKs, so regressions could block card flows even though logic is feature-flag/eligibility gated.

Overview
Introduces a new pushProvisioning module (types, constants, provider factories, adapters, service, and usePushProvisioning) to support adding a card to Apple/Google wallets via provider-encrypted payloads, with eligibility checks, activation event handling, and standardized error/logging utilities.

CardHome now derives a provisioning-ready user address/card details, calls usePushProvisioning, and conditionally renders an AddToWalletButton (with spinner) plus success/error toasts; shipping-address construction is extracted to shared buildUserAddress utilities and ReviewOrder reuses the shared ShippingAddress type. The card SDK gains createGoogleWalletProvisioningRequest and createApplePayProvisioningRequest endpoints to fetch encrypted provisioning payloads, with extensive new unit tests across the new infrastructure and UI integration.

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

Add the shared infrastructure for push provisioning cards to mobile wallets.
This base branch contains:

- Core hook (usePushProvisioning) and service (PushProvisioningService)
- Card provider adapters (GalileoCardAdapter for US users)
- Base wallet adapter interfaces and utilities
- Feature flag selectors for both platforms
- CardHome and ReviewOrder UI integration
- Localization strings and analytics events

Platform-specific implementations (GoogleWalletAdapter, AppleWalletAdapter)
are added in separate branches:
- feat/google-in-app-provisioning
- feat/apple-in-app-provisioning

Co-authored-by: Cursor <cursoragent@cursor.com>
@Brunonascdev Brunonascdev self-assigned this Feb 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 4, 2026

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 4, 2026
@socket-security
Copy link
Copy Markdown

socket-security bot commented Feb 4, 2026

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​expensify/​react-native-wallet@​0.1.158110010090100

View full report

@Brunonascdev Brunonascdev marked this pull request as ready for review February 4, 2026 23:38
@Brunonascdev Brunonascdev requested a review from a team as a code owner February 4, 2026 23:38
klejeune
klejeune previously approved these changes Feb 5, 2026
klejeune
klejeune previously approved these changes Feb 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 5, 2026

🔍 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 introduces Push Provisioning functionality for the MetaMask Card feature, allowing users to add their MetaMask Card to mobile wallets (Google Wallet/Apple Pay).

Key changes include:

  1. New @expensify/react-native-wallet package dependency
  2. Complete push provisioning module with adapters, services, hooks, and types
  3. CardHome UI updates with "Add to Wallet" button
  4. CardSDK extensions for Google/Apple provisioning API calls
  5. New feature flag selectors for wallet provisioning
  6. New analytics events for tracking provisioning flows
  7. Localization strings for provisioning UI

All changes are isolated to the Card module (app/components/UI/Card/). The wallet library is disabled by default in react-native.config.js, and the feature is gated behind feature flags. No changes affect core navigation, confirmations, or other shared components.

SmokeCard is the appropriate tag as it tests MetaMask Card integration including the Card home screen display, card status, and card-related functionality. The tag description mentions it covers "Card home screen display showing card status and balance" which is where the new "Add to Wallet" button is added.

Note: Per the tag description, SmokeCard suggests also selecting SmokeTrade and SmokeConfirmations when Add Funds uses swaps. However, this PR doesn't modify the Add Funds flow - it adds a separate "Add to Wallet" button for push provisioning which doesn't involve swaps or transaction confirmations.

Performance Test Selection:
This PR adds new push provisioning functionality to the Card feature but does not impact performance-critical paths. The changes are: (1) new UI button that only appears under specific conditions (feature flag enabled, authenticated, card active), (2) new API calls that are user-initiated and not part of app startup or critical rendering paths, (3) new hooks and services that are lazily loaded. The wallet module is disabled by default and the feature is behind feature flags. No changes affect account lists, login, app launch, asset loading, swaps, or other performance-sensitive areas.

View GitHub Actions results

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.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 5, 2026

@Brunonascdev Brunonascdev added this pull request to the merge queue Feb 5, 2026
Merged via the queue into main with commit 14babfe Feb 5, 2026
86 of 87 checks passed
@Brunonascdev Brunonascdev deleted the feat/card-push-provisioning-base branch February 5, 2026 22:20
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2026
@metamaskbot metamaskbot added the release-7.66.0 Issue or pull request that will be included in release 7.66.0 label Feb 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants