Skip to content

Conversation

@infiniteflower
Copy link
Contributor

Description

This PR adds a migration to remove SwapsController from the background state.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/SWAPS-3493

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.

@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-swaps-and-bridge Swaps and Bridge team label Dec 18, 2025
@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeSwaps, SmokeTrade, SmokeCore
  • Risk Level: medium
  • AI Confidence: 80%
click to see 🤖 AI reasoning details

This PR adds a new state migration (migration 110) that removes the SwapsController state from the persisted backgroundState. The migration comment indicates that SwapsController functionality has been moved to BridgeController/unified swaps.

Key observations:

  1. The migration is straightforward - it simply deletes the SwapsController property from backgroundState if it exists
  2. SwapsController is still actively used in the codebase (in Swaps UI components, Bridge components, AssetOverview, etc.)
  3. The migration only removes persisted state, not the controller itself - the controller will still function but start fresh without cached data
  4. This is a cleanup migration for deprecated persisted state

The changes are well-tested with unit tests covering various scenarios (missing state, successful removal, error handling).

Selected tags rationale:

  • SmokeSwaps: Directly tests swap functionality which uses SwapsController
  • SmokeTrade: Tests token swaps, bridge, and DEX trading - all related to the affected controller
  • SmokeCore: Tests core wallet functionality and app state - migrations affect app state initialization

The risk is medium because while the migration is simple, it affects a core feature (swaps) and any issues with state migration could impact user experience when upgrading the app.

View GitHub Actions results

@infiniteflower infiniteflower added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Dec 18, 2025
@sonarqubecloud
Copy link

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-M team-swaps-and-bridge Swaps and Bridge team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants