feat: upgrade subscription controller for error surface#39938
Merged
chaitanyapotti merged 14 commits intomainfrom Feb 12, 2026
Merged
feat: upgrade subscription controller for error surface#39938chaitanyapotti merged 14 commits intomainfrom
chaitanyapotti merged 14 commits intomainfrom
Conversation
Contributor
✨ Files requiring CODEOWNER review ✨🕵️ @MetaMask/extension-privacy-reviewers (1 files, +1 -0)
🧪 @MetaMask/qa (1 files, +1 -0)
🔐 @MetaMask/web3auth (3 files, +81 -4)
|
ui/pages/settings/transaction-shield-tab/transaction-shield.tsx
Outdated
Show resolved
Hide resolved
Contributor
Builds ready [0855118]
UI Startup Metrics (1309 ± 96 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Contributor
Builds ready [8d82ba3]
UI Startup Metrics (1404 ± 106 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Contributor
Builds ready [1738700]
UI Startup Metrics (1341 ± 95 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Contributor
Builds ready [65df2e9]
UI Startup Metrics (1397 ± 108 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Contributor
Builds ready [d1ad263]
UI Startup Metrics (1397 ± 103 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
lionellbriones
approved these changes
Feb 12, 2026
chaitanyapotti
approved these changes
Feb 12, 2026
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
When a shield subscription crypto approval fails in the background (e.g. submitShieldSubscriptionCryptoApproval throws), the error was previously only logged and not surfaced to the user. This PR adds end-to-end error propagation so the user sees the failure on the Shield Plan and Transaction Shield settings pages.
Changelog
CHANGELOG entry: Added error display on Shield Plan and Transaction Shield pages when a subscription payment fails in the background
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2026-02-10.at.16.33.25.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches cross-layer wiring (background controller state, messenger actions, and UI error handling), so regressions could suppress Shield flows or spam error UI, but it does not change auth or transaction execution logic.
Overview
Surfaces Transaction Shield subscription failures that happen in the background by introducing a transient
AppStateController.shieldSubscriptionErrorand wiring it through the messenger soSubscriptionServicecan set/clear it whensubmitShieldSubscriptionCryptoApprovalfails.Updates Shield UI flows (
ShieldPlanand Transaction Shield settings) to consume this error via a newuseSubscriptionErrorhook and display a friendlier i18n message for the known “payer address already used” case, using an enhancedApiErrorHandlerthat now accepts an optional overridemessage.Adds the new Shield error constant/type, background action (
setShieldSubscriptionError), selector, and associated unit/e2e snapshot updates to validate the new state field and error propagation.Written by Cursor Bugbot for commit d1ad263. This will update automatically on new commits. Configure here.