feat: sync V2 ramps orders with Backup & Sync#33148
Conversation
|
CLA Signature Action: Thank you for your submission, we really appreciate it. We ask that you read and sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just by adding a comment to this pull request with this exact sentence:
By commenting with the above message you are agreeing to the terms of the CLA. Your account will be recorded as agreeing to our CLA so you don't need to sign it again for future contributions to this repository. 0 out of 1 committers have signed the CLA.
|
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
Wire RampsController order syncing into mobile: messenger delegation, Backup & Sync sub-toggle, identity-effect pull on unlock, and fixtures for isRampsSyncingEnabled. Depends on MetaMask/core#9474. Co-authored-by: Cursor <cursoragent@cursor.com>
Align selectIsRampsSyncingEnabled with UserStorageController default state so the Backup & Sync toggle and background sync gates stay consistent for upgraded profiles that omit isRampsSyncingEnabled. Co-authored-by: Cursor <cursoragent@cursor.com>
@metamask/ramps-controller no longer exports normalizeProviderCode; use raw provider IDs from quotes and orders so V2 ramp flows compile against core order-syncing packages. Co-authored-by: Cursor <cursoragent@cursor.com>
b129eca to
e8da86c
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
🧪 Flaky unit test detectionRun history flaky detectionHistorical failure rate is a hint, not proof — review each suggestion in context. See the flaky-test-detection skill for the full pattern reference and manual audit workflow. Failures / runs sampled per window:
AI-detected flaky patterns
|
Summary
RampsController.syncOrdersWithUserStorage()can run.BACKUPANDSYNC_FEATURES.rampsSyncing/isRampsSyncingEnabled).useRampsOrderSyncinginuseIdentityEffects; localaddOrder/removeOrderpush incrementally from core.selectIsRampsSyncingEnableddefaults totruewhen absent from persisted state (matches controller + core sync utils).@metamask/ramps-controller(removesnormalizeProviderCodeusage).Depends on
Works with
feat/ramps-orders-qa-tabon metamask-extension for manual inspection during testing.Cross-client flow
useRampsOrderSyncingcallssyncOrdersWithUserStorage→ order appears inRampsController.orders.Local testing (until core packages are published)
Built packages from core
feat/ramps-order-syncingwere copied intonode_modulesfor local testing:Then restart Metro and verify:
RampsController.ordersand is written to User StorageTest plan
useRampsOrderSyncingunit testsuseTransakRouting,unifiedOrderProcessor)@metamask/profile-sync-controller+@metamask/ramps-controlleronce core feat: add localizations for the browser tab #9474 is published