Skip to content

chore(delegation): remove unused hex helpers - #38955

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

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

Conversation

@georgewrmarshall

@georgewrmarshall georgewrmarshall commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Remove two unused delegation helpers. Owner set: (none). No user-facing behavior change.

Both symbols were added with the delegation-controller integration on 2025-10-14 and have no importers. The file app/core/Delegation/delegation.ts was last changed on 2026-10-14 on unrelated lines. 0xcef6d209 does not appear anywhere else.

path removed (file / symbol / style key) why dead
app/core/Delegation/utils.ts isHexEqual unused export
app/core/Delegation/delegation.ts REDEEM_DELEGATIONS_SELECTOR 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 only; delegation encoding and redemption paths are unchanged.

Overview
Removes two unused exports from the delegation core module with no inbound references and no behavior change.

REDEEM_DELEGATIONS_SELECTOR (0xcef6d209) is deleted from delegation.ts; redeem calldata still goes through encodeRedeemDelegations, which derives the selector via toFunctionSelector.

isHexEqual is removed from utils.ts; hex comparison elsewhere was not using this helper.

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

Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
@georgewrmarshall georgewrmarshall added the team-design-system All issues relating to design system in Mobile label 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: 98

E2E reasoning

Expand to read

The PR removes two unused exports from the Delegation module:

  1. REDEEM_DELEGATIONS_SELECTOR constant from delegation.ts
  2. isHexEqual utility function from utils.ts

A codebase-wide grep confirms neither REDEEM_DELEGATIONS_SELECTOR nor isHexEqual are referenced anywhere else in the codebase (no results found). These are dead code removals with zero consumers. No user-facing flows, UI components, controllers, or test infrastructure are affected. No E2E smoke tests need to run for these purely cosmetic/cleanup changes.

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 55da5a2 Nov 6, 2026
108 checks passed
@georgewrmarshall
georgewrmarshall deleted the cursor/remove-dead-code-delegation-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