fix(confirmations): scope MM Pay payment methods to deposit asset (TRAM-3838) - #34469
fix(confirmations): scope MM Pay payment methods to deposit asset (TRAM-3838)#34469saustrie-consensys wants to merge 2 commits into
Conversation
…text Use RampsController.getPaymentMethodsForContext with the TPC deposit asset and headless quote flags so Money Pay with no longer lists Buy-only methods such as Revolut Pay. Temporary preview of @metamask/ramps-controller from core #9801; also require chainId for addPrecreatedOrder (20.x breaking).
|
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. |
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. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Caution MetaMask internal reviewing guidelines:
|
🧪 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
|
CocoaPods/autolinking yarn resolution failed because previewBuilds type:breaking removed the ^19.0.0 lockfile descriptor while package.json still declared it. Pin the preview package with an explicit npm alias so the lockfile descriptor matches what yarn resolves without the preview-builds plugin remap.
d450d4e to
ad611b5
Compare
Description
Money account "Pay with" was listing Buy-scoped payment methods (for example Revolut Pay) that cannot be quoted against the deposit asset / headless provider set, which then surfaced
alert_system.no_pay_token_quotes.This PR points all four MM Pay payment-method consumers at a request-only
RampsController.getPaymentMethodsForContextcall scoped to the same deposit asset path TPC uses for quotes (confirmations_pay_fiat.assetPerTransactionType/ defaults), withautoSelectProvider+restrictToKnownOrNativeProviders. Stale TPCfiatPayment.selectedPaymentMethodIdvalues are cleared only after a successful fetch when the id is absent from that list.Temporary preview dependency (blocked)
Consumes
@metamask-previews/ramps-controller@20.0.0-preview-6e2b5fefrom core draft PR MetaMask/core#9801 via an explicit npm alias dependency (notpreviewBuilds) so CocoaPods/autolinking lockfile resolution succeeds in CI. Do not merge until core lands a formal@metamask/ramps-controllerrelease and this PR bumps off the preview. Also includes theaddPrecreatedOrdernon-emptychainIdclient guard required by ramps-controller 20.x.Exp TestFlight consumer build
Successful exp upload for this branch:
metamask-device-exp-main-8.8.0-6393.ipa8.8.0/6393ad611b59aa97e0f4942ee82b0d0d0d549edb1a95MetaMask BETA & Release Candidates(external distribution succeeded)Manual on-device QA of the Gherkin scenarios below is still required before formal core release.
Changelog
CHANGELOG entry: Fixed Money account Pay with offering payment methods that cannot produce a deposit quote
Related issues
Fixes: TRAM-3838
Refs: #34109
Refs: MetaMask/core#9801
Refs: TRAM-3856
Manual testing steps
Install TestFlight build
8.8.0 (6393)from groupMetaMask BETA & Release Candidates(workflow https://github.com/MetaMask/metamask-mobile/actions/runs/31185137884) and run the scenarios above on device. Manual QA is not complete until that validation is done.Screenshots/Recordings
N/A: UI regression is validated on device via TestFlight build
8.8.0 (6393); screenshots/recordings will follow after that install and the manual scenarios above.Before
N/A pending on-device TestFlight QA
After
N/A pending on-device TestFlight QA
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist