Skip to content

fix: Adding missing metrics property is_smart_transaction for smart transactions#21027

Merged
jpuri merged 5 commits into
mainfrom
smart_trxn_metrics_fix
Oct 10, 2025
Merged

fix: Adding missing metrics property is_smart_transaction for smart transactions#21027
jpuri merged 5 commits into
mainfrom
smart_trxn_metrics_fix

Conversation

@jpuri

@jpuri jpuri commented Oct 10, 2025

Copy link
Copy Markdown
Contributor

Description

Adding missing metrics property is_smart_transaction for smart transactions

Changelog

CHANGELOG entry:

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/5766

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

NA

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Adds is_smart_transaction flag to smart transaction metrics and returns it when statusMetadata is missing; updates tests accordingly.

  • Utilities:
    • app/util/smart-transactions/index.ts
      • getSmartTransactionMetricsProperties: now returns { is_smart_transaction: true } when a smart transaction exists without statusMetadata, and includes is_smart_transaction in the returned metrics object.
  • Tests:
    • app/util/smart-transactions/index.test.ts: update expectations to include is_smart_transaction in relevant cases; adjust test to expect { is_smart_transaction: true } when statusMetadata is undefined.
    • app/core/Engine/controllers/transaction-controller/event-handlers/metrics.test.ts: include is_smart_transaction in mocked properties and assertions for finalized transaction metrics.

Written by Cursor Bugbot for commit 26f2d9c. This will update automatically on new commits. Configure here.

@jpuri jpuri added No QA Needed Apply this label when your PR does not need any QA effort. team-confirmations Push issues to confirmations team no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Oct 10, 2025
@github-actions

Copy link
Copy Markdown
Contributor

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.

@jpuri jpuri enabled auto-merge October 10, 2025 07:57
cursor[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added size-S and removed size-XS labels Oct 10, 2025
@jpuri jpuri requested a review from a team as a code owner October 10, 2025 08:36
@sonarqubecloud

Copy link
Copy Markdown

@jpuri jpuri added this pull request to the merge queue Oct 10, 2025
Merged via the queue into main with commit c17e813 Oct 10, 2025
183 of 189 checks passed
@jpuri jpuri deleted the smart_trxn_metrics_fix branch October 10, 2025 11:04
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 10, 2025
@metamaskbot metamaskbot added the release-7.58.0 Issue or pull request that will be included in release 7.58.0 label Oct 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

No QA Needed Apply this label when your PR does not need any QA effort. no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.58.0 Issue or pull request that will be included in release 7.58.0 size-S team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants