Skip to content

fix: align warning icon inline with estimated changes row label - #42936

Closed
tenderdeve wants to merge 1 commit into
MetaMask:mainfrom
tenderdeve:fix/42928-estimated-changes-warning-alignment
Closed

tenderdeve wants to merge 1 commit into
MetaMask:mainfrom
tenderdeve:fix/42928-estimated-changes-warning-alignment

Conversation

@tenderdeve

@tenderdeve tenderdeve commented May 26, 2026 •

Copy link
Copy Markdown

The alert icon for malicious approve simulations was rendering below the "You approve" label instead of next to it. This was caused by the BalanceChangesAlert component being a separate Fragment child in the static rows loop, placing the icon in its own block outside the row.

Fixes #42928

Replaced BalanceChangesAlert with the existing ConfirmInfoAlertRow pattern used as the row's label — the same approach already used for the incoming tokens heading and the network fee row. The BalanceChangeList and BalanceChangeRow components now accept optional labelAlertKey/labelAlertOwnerId props 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 BalanceChangesAlert block and wiring alerts into the first row’s label.

BalanceChangeList / BalanceChangeRow now accept optional labelAlertKey and labelAlertOwnerId; on the first row they render ConfirmInfoAlertRow beside the heading (same pattern as incoming-token alerts). Static simulation rows pass RowAlertKey.EstimatedChangesStatic with the transaction id instead of a sibling Fragment + inline alert + modal wrapper.

Reviewed by Cursor Bugbot for commit 66405eb. Bugbot is set up for automated code reviews on this repo. Configure here.

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
tenderdeve marked this pull request as ready for review May 26, 2026 11:28
@tenderdeve
tenderdeve requested a review from a team as a code owner May 26, 2026 11:28
@github-actions

Copy link
Copy Markdown
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.

@github-actions github-actions Bot added the stale issues and PRs marked as stale label Aug 25, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

This PR was closed because there has been no follow up activity in 7 days. Thank you for your contributions.

@github-actions github-actions Bot closed this Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale issues and PRs marked as stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Confirmations - Estimated changes miss-aligned warning icon

1 participant