Repository navigation
fix: align warning icon inline with estimated changes row label - #42936
Closed
tenderdeve wants to merge 1 commit into
Closed
tenderdeve wants to merge 1 commit into
tenderdeve wants to merge 1 commit into
Conversation
The alert icon for malicious approve simulations was rendering below the "You approve" label instead of next to it. This happened because the BalanceChangesAlert was a separate Fragment child in the static rows loop rather than being embedded inside the row label. Replace BalanceChangesAlert with ConfirmInfoAlertRow used as the label for the first balance change row, following the same pattern already used for incoming tokens and the network fee row. Fixes MetaMask#42928
tenderdeve
marked this pull request as ready for review
May 26, 2026 11:28
Contributor
|
This PR has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 7 days. Thank you for your contributions. |
Contributor
|
This PR was closed because there has been no follow up activity in 7 days. Thank you for your contributions. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The alert icon for malicious approve simulations was rendering below the "You approve" label instead of next to it. This was caused by the
BalanceChangesAlertcomponent being a separateFragmentchild in the static rows loop, placing the icon in its own block outside the row.Fixes #42928
Replaced
BalanceChangesAlertwith the existingConfirmInfoAlertRowpattern used as the row's label — the same approach already used for the incoming tokens heading and the network fee row. TheBalanceChangeListandBalanceChangeRowcomponents now accept optionallabelAlertKey/labelAlertOwnerIdprops that wire the alert inline with the first-row heading.Note
Low Risk
Confirmation UI layout only; reuses existing alert row behavior with no auth, transaction, or simulation logic changes.
Overview
Fixes estimated changes simulation warnings rendering on a separate line below headings like “You approve” by removing the standalone
BalanceChangesAlertblock and wiring alerts into the first row’s label.BalanceChangeList/BalanceChangeRownow accept optionallabelAlertKeyandlabelAlertOwnerId; on the first row they renderConfirmInfoAlertRowbeside the heading (same pattern as incoming-token alerts). Static simulation rows passRowAlertKey.EstimatedChangesStaticwith the transaction id instead of a siblingFragment+ inline alert + modal wrapper.Reviewed by Cursor Bugbot for commit 66405eb. Bugbot is set up for automated code reviews on this repo. Configure here.