feat(card): add push provisioning base infrastructure#25669
feat(card): add push provisioning base infrastructure#25669Brunonascdev merged 9 commits intomainfrom
Conversation
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>
|
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.
|
…k/metamask-mobile into feat/card-push-provisioning-base
app/components/UI/Card/pushProvisioning/adapters/wallet/BaseWalletAdapter.ts
Show resolved
Hide resolved
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Key changes include:
All changes are isolated to the Card module ( 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: |
|



Description
Add the shared infrastructure for push provisioning cards to mobile wallets. This base branch contains:
Platform-specific implementations (GoogleWalletAdapter, AppleWalletAdapter) are added in separate branches:
Changelog
CHANGELOG entry: Base setup for in-app provisioning
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
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
pushProvisioningmodule (types, constants, provider factories, adapters, service, andusePushProvisioning) to support adding a card to Apple/Google wallets via provider-encrypted payloads, with eligibility checks, activation event handling, and standardized error/logging utilities.CardHomenow derives a provisioning-ready user address/card details, callsusePushProvisioning, and conditionally renders anAddToWalletButton(with spinner) plus success/error toasts; shipping-address construction is extracted to sharedbuildUserAddressutilities andReviewOrderreuses the sharedShippingAddresstype. The card SDK gainscreateGoogleWalletProvisioningRequestandcreateApplePayProvisioningRequestendpoints 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.