fix: replace TransactionAlreadyConfirmed modal with toast for cancel/speed-up errors#41241
fix: replace TransactionAlreadyConfirmed modal with toast for cancel/speed-up errors#41241vinistevam wants to merge 14 commits intomainfrom
TransactionAlreadyConfirmed modal with toast for cancel/speed-up errors#41241Conversation
|
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. |
✨ Files requiring CODEOWNER review ✨✅ @MetaMask/confirmations (8 files, +500 -8)
|
Builds ready [29c3e03]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
7f8c39e to
41d109a
Compare
Builds ready [41d109a]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [d245b42]
⚡ Performance Benchmarks (Total: 🟢 18 pass · 🟡 0 warn · 🔴 0 fail)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [748af64]
⚡ Performance Benchmarks (Total: 🟢 18 pass · 🟡 0 warn · 🔴 0 fail)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [e2697db]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs
|
Builds ready [eec079c]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [418ddee]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs
|
Builds ready [5c08356]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs
|
a2cdafb to
e78dc78
Compare
Builds ready [e78dc78]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
e78dc78 to
af6d01b
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit af6d01b. Configure here.
|
Builds ready [af6d01b]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|




Description
TransactionAlreadyConfirmedmodal and replaces it with a non-blocking toast notification that surfaces errors for both cancel and speed-up transactions.useCancelSpeedupActionshook to centralize the async submit and error-handling logic, and aCancelSpeedupErrorToastcomponent rendered via a portal so positioning is not affected by ancestor transforms.Motivation
The
TransactionAlreadyConfirmedmodal was only wired for cancellations and required an explicit user dismissal despite being purely informational. Speed-up failures were silently swallowed via a deprecateddisplayWarning. This PR aligns the extension with the mobile approach, handling both flows uniformly.Changelog
CHANGELOG entry: Replaced the "Transaction Already Confirmed" modal with an informational toast notification that now displays for both cancel and speed-up transaction errors
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/CONF-1075
Manual testing steps
Screenshots/Recordings
toast.webm
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes the cancel/speed-up submission flow to close the modal immediately and surface async failures via a new toast, which could affect user feedback/timing and error visibility in a transaction-critical path.
Overview
Replaces the blocking
TransactionAlreadyConfirmedmodal with a non-blocking, auto-hiding toast shown when cancel/speed-up submissions fail (including a specific message when the original tx is already confirmed).Refactors the cancel/speed-up UI to submit via a new
useCancelSpeedupActionshook that closes the modal, awaits the underlying thunk, and captures errors for toast rendering; associated cancel/speed-up action creators now return their dispatch results so failures can be handled by the caller. Removes the old modal component/tests and updates i18n strings accordingly.Reviewed by Cursor Bugbot for commit af6d01b. Bugbot is set up for automated code reviews on this repo. Configure here.