Skip to content

Conversation

@racitores
Copy link
Contributor

@racitores racitores commented Dec 18, 2025

Description

Changelog

CHANGELOG entry:

Related issues

Fixes:

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

Before

After

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

Skips starting the background transactions polling timer when the app goes to background if running in E2E, by gating it behind isE2E and importing the flag.

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

@racitores racitores changed the title text: remove timer if isE2E test: remove timer if isE2E Dec 18, 2025
@github-actions
Copy link
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.

@metamaskbot metamaskbot added the team-qa QA team label Dec 18, 2025
@racitores racitores added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Dec 18, 2025
@racitores racitores force-pushed the raci/fix-timer-main-wallet branch from 4c106be to f3a60ca Compare December 18, 2025 14:55
@racitores racitores marked this pull request as ready for review December 19, 2025 11:29
@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeCore
  • Risk Level: low
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

The change modifies app/components/Nav/Main/index.js to skip running BackgroundTimer.runBackgroundTimer for updating incoming transactions when the app is in E2E test mode (isE2E). This is a test infrastructure optimization that:

  1. Only affects E2E test runs: The isE2E flag is true only when process.env.IS_TEST === 'true' or process.env.METAMASK_ENVIRONMENT === 'e2e'
  2. Does not change production behavior: The background timer for transaction updates still runs normally in production
  3. Is a common pattern: The isE2E flag is already used in many places throughout the codebase (e.g., usePna25BottomSheet, useMultichainAccountsIntroModal, useRewardsIntroModal, e2eBridgePerps) for similar purposes
  4. Simple conditional wrapper: The change just wraps existing code in an if (!isE2E) check

The Main component is a core navigation component that handles app state changes, notifications, and network switching. Running SmokeCore tests will verify that the core wallet functionality and navigation still work correctly with this change. Since the change is specifically designed to improve E2E test stability and doesn't modify any business logic, the risk is low.

View GitHub Actions results

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
D Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-XS team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants