feat: filter out intent based swaps from quote status manager - #10171
Merged
Conversation
GeorgeGkas
temporarily deployed
to
default-branch
September 10, 2026 16:13 — with
GitHub Actions
Inactive
Co-authored-by: Cursor <cursoragent@cursor.com>
bfullam
approved these changes
Sep 11, 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 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.
Explanation
The quote status manager currently reports
SUBMITTEDand finalized statuses for every swap/bridge intxHistory, including intent-based orders (quotes that carryquote.intent, e.g. CoW). That is incorrect: the bridge backend already watches intent settlement and owns those statuses. Client-side reports can race with, or overwrite, backend-owned quote status.This change keeps the client from creating or updating quote-status tracking for intent orders:
#isIntentHistoryItemand usesquote.intentas the signal that an order is backend-tracked.reportSubmittedOnce/reportFinalisedon transaction submitted, confirmed, and failed handlers.quoteUpdateStatusStorefor intent history items.The public controller API is unchanged. Only quote-status reporting behavior changes, and only for intent history items.
A related, less obvious cleanup: the old “report submitted on confirm because the hash arrived in the same update” path was written for EVM intent swaps. That path is now used for non-intent smart/batch swaps (hash often appears only at confirm), and is no longer used for intents.
Only
@metamask/bridge-status-controlleris updated. No other packages or dependency upgrades.References
https://consensyssoftware.atlassian.net/browse/SWAPS-5052
Checklist
Checklist notes for reviewers
COMPLETEDorEXPIRED.#isIntentHistoryItemand on#reportSubmittedOnce.SUBMITTEDor finalized quote statuses to the quote status API for intent-based swaps, since the bridge backend observes intent settlement and owns those statuses (add the PR link after open).Note
Medium Risk
Changes when swap quote statuses are reported to the backend for intent orders only; wrong gating could leave non-intent swaps untracked or still double-report intents, but scope is narrow and well tested.
Overview
Intent-based swaps (history items with
quote.intent, e.g. CoW) no longer sendSUBMITTEDor finalized updates to the quote status API. The bridge backend already tracks intent settlement, and client reports could race or overwrite that state.The controller adds
#isIntentHistoryItemand gates#reportSubmittedOnce/#quoteStatusManager.reportFinalisedon transaction failure, confirmation, intent polling at terminal status, and stale-history cleanup. Intent polling no longer calls#reportSubmittedOncewhen a settlement hash appears mid-poll.The “report submitted on confirm when the hash arrives in the same update” path is retained for non-intent smart/batch swaps (hash often only known at confirm), not for intents. Startup backfill still runs through
#reportSubmittedOnce, so intent history is not seeded intoquoteUpdateStatusStore. Public API is unchanged; tests and a changelog entry cover the new behavior.Reviewed by Cursor Bugbot for commit 4fbf918. Bugbot is set up for automated code reviews on this repo. Configure here.