Repository navigation
fix: label blockaid simulation reverts as likely to fail - #3089
Merged
JakeUrban merged 4 commits intoNov 13, 2026
Merged
Conversation
👷 Deploy request for freighter-docs pending review.Visit the deploys page to approve it
|
devodii
force-pushed
the
fix/blockaid-simulation-revert-label
branch
from
November 12, 2026 17:37
665726d to
60d2f87
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The malicious-site banner can open details that show only “Likely to fail,” omitting the site risk because the site severity and warning reason are not forwarded.
1 open issue
What changed in this PR
This PR distinguishes transaction simulation failures from security risks in Freighter’s signing, send, and swap review flows.
Changes:
- Adds a “likely to fail” classification while preserving higher-priority malicious and suspicious verdicts.
- Updates banners, details-sheet copy, and confirmation styling for simulation-only failures.
- Adds English and Portuguese strings and updates regression tests.
| File | Description |
|---|---|
extension/src/popup/views/SignTransaction/index.tsx |
Stops treating simulation errors alone as destructive confirmations. |
extension/src/popup/views/__tests__/SignTransaction.test.tsx |
Expects the new failure banner text. |
extension/src/popup/locales/pt/translation.json |
Adds Portuguese failure messages. |
extension/src/popup/locales/en/translation.json |
Adds English failure messages. |
extension/src/popup/helpers/blockaid.ts |
Separates simulation failures from suspicious verdicts. |
extension/src/popup/helpers/__tests__/blockaid.test.tsx |
Tests failure classification and verdict precedence. |
extension/src/popup/constants/blockaid.ts |
Adds and ranks LIKELY_TO_FAIL. |
extension/src/popup/constants/__tests__/blockaid.test.ts |
Tests the new severity ordering. |
extension/src/popup/components/WarningMessages/index.tsx |
Adds failure-specific details-sheet titles and subtitles. |
extension/src/popup/components/InternalTransaction/ReviewTransaction/index.tsx |
Integrates failure warnings into send and swap review. |
extension/src/popup/components/BlockaidBanner/index.tsx |
Adds the shared “likely to fail” banner label. |
extension/src/popup/components/BlockaidBanner/__tests__/BlockaidBanner.test.tsx |
Tests the failure banner label. |
Review effort: Balanced
The sign-transaction details sheet only received the transaction scan, so a benign-but-reverting transaction from a malicious site opened a "Likely to fail" sheet that never mentioned the site risk the banner reported. Forward the site severity and reason via extraSeverityLevel and extraWarnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R8cp3zXi8eMsEZ4XmFe6K6
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.

What
A transaction that Blockaid simulated as a revert, for example an insufficient balance, was labeled "This transaction was flagged as suspicious". The details sheet title stayed "Proceed with caution" and the only detail was the revert string, so a transaction that will fail read like a safety warning.
Fix
The security check now reads the verdict first. Malicious and Warning are unchanged. A simulation error with no Warning or Malicious verdict is labeled "This transaction is likely to fail". The details sheet title is "Likely to fail", and Confirm anyway is not treated as destructive when the only finding is a revert. Send and swap review uses the same label.
Tested
yarn build:extensionpasses.