Skip to content

chore(settings): remove unused settings action creators - #38952

Merged
georgewrmarshall merged 1 commit into
mainfrom
cursor/remove-dead-code-settings-20261105
Nov 6, 2026
Merged

georgewrmarshall merged 1 commit into
mainfrom
cursor/remove-dead-code-settings-20261105

Conversation

@georgewrmarshall

@georgewrmarshall georgewrmarshall commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Remove two unused Redux action creators from app/actions/settings/index.js. Owner set: (none). No user-facing behavior change.

toggleDeviceNotification has no importers. NotificationService still dispatches the TOGGLE_DEVICE_NOTIFICATIONS string, and the settings reducer still handles it, so only the unused creator is deleted.

setTokenSortConfig here is the unused action creator. SET_TOKEN_SORT_CONFIG has no other references. PreferencesController.setTokenSortConfig is a different method and is unchanged.

path removed (file / symbol / style key) why dead
app/actions/settings/index.js toggleDeviceNotification unused export
app/actions/settings/index.js setTokenSortConfig unused export

Docs/comments updated: none

Changelog

CHANGELOG entry: null

Related issues

Refs: proactive dead-code cleanup (see #34030)

Manual testing steps

N/A — deletes code with no inbound references; verified with yarn lint:tsc, eslint and jest on affected directories (no snapshot changes).

Screenshots/Recordings

N/A — no UI change

Before

N/A — no UI change

After

N/A — no UI change

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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

Low Risk
Dead-code deletion with no inbound references and no user-facing behavior change.

Overview
Removes two unused Redux action creators from app/actions/settings/index.js: toggleDeviceNotification and setTokenSortConfig.

Nothing in the app imported these exports. Device notifications still work the same way—NotificationService dispatches TOGGLE_DEVICE_NOTIFICATIONS directly and the settings reducer still handles that type. Token sort still goes through PreferencesController.setTokenSortConfig; only the dead settings action (and its SET_TOKEN_SORT_CONFIG type) is gone.

Reviewed by Cursor Bugbot for commit a70d9f5. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
@github-actions github-actions Bot added the size-S label Nov 5, 2026
@georgewrmarshall georgewrmarshall added team-design-system All issues relating to design system in Mobile and removed size-S labels Nov 5, 2026 — with Cursor
@georgewrmarshall georgewrmarshall self-assigned this Nov 5, 2026
@github-actions github-actions Bot added the size-S label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Smart E2E Test Selection

Selected E2E tags: No E2E tests selected

AI Confidence: 95

E2E reasoning

Expand to read

The PR removes two action creators from app/actions/settings/index.js: toggleDeviceNotification (TOGGLE_DEVICE_NOTIFICATIONS) and setTokenSortConfig (SET_TOKEN_SORT_CONFIG). Exhaustive searches across the codebase found zero references to either function name or their corresponding action type strings anywhere in the app. These are dead code removals with no consumers. No UI flows, reducers, selectors, or components are affected. No E2E test specs reference these actions. The change is purely a cleanup of unused exports with no functional impact on any user-facing feature or test flow. No smoke tags are warranted.

View run

@sonarqubecloud

sonarqubecloud Bot commented Nov 5, 2026

Copy link
Copy Markdown

@georgewrmarshall
georgewrmarshall added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit 54a2dd9 Nov 6, 2026
168 of 170 checks passed
@georgewrmarshall
georgewrmarshall deleted the cursor/remove-dead-code-settings-20261105 branch November 6, 2026 07:09
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 6, 2026
@metamask-ci metamask-ci Bot added the release-8.21.0 Issue or pull request that will be included in release 8.21.0 label Nov 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-8.21.0 Issue or pull request that will be included in release 8.21.0 size-S team-design-system All issues relating to design system in Mobile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants