feat: subscription-state-after-exiting-modal#39695
Merged
chaitanyapotti merged 11 commits intomainfrom Feb 3, 2026
Merged
Conversation
Contributor
✨ Files requiring CODEOWNER review ✨🔐 @MetaMask/web3auth (1 files, +29 -2)
|
Contributor
Builds ready [b7d7db4]
UI Startup Metrics (1265 ± 111 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Contributor
Builds ready [d18ff24]
UI Startup Metrics (1362 ± 112 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Contributor
Builds ready [f11ccdd]
UI Startup Metrics (1356 ± 129 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
chaitanyapotti
approved these changes
Feb 3, 2026
lwin-kyaw
approved these changes
Feb 3, 2026
Contributor
Builds ready [dc1fc54]
UI Startup Metrics (1413 ± 108 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR improves the Shield subscription payment flow by clearing the cached payment method after payment fail/cancel
Problem:
Additionally, when clearing the cache, the UI would auto-switch the payment method unexpectedly due to a useEffect dependency on lastUsedPaymentDetails.
Solution:
Changelog
CHANGELOG entry: reset shield default payment method to most suitable one (crypto) if available after payment flow cancel
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2026-02-02.at.17.01.00.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches Shield subscription payment flows (card and crypto) and the UI default-payment selection logic, so regressions could affect the checkout retry experience. Changes are small and covered by an updated unit test around timeout/failure behavior.
Overview
Improves Shield subscription retry behavior after failed/cancelled payments. The subscription background service now calls
SubscriptionController:clearLastSelectedPaymentMethodon card checkout errors (including polling timeout/cancel) and on crypto approval failures, after tracking failure metrics.Updates the SubscriptionService messenger/type allowlists to include the new controller action and extends tests to assert the cache clear happens.
Prevents unexpected UI switching.
ShieldPlanadds auseRefguard so the initial auto-selection (crypto vs card) only runs once, and clicking Continue now sets this flag before starting the subscription flow.Written by Cursor Bugbot for commit dc1fc54. This will update automatically on new commits. Configure here.