Repository navigation
Commit 093b11a
chore(selectors): remove unused selector imports (#47637)
## **Description**
Removes two unused imports reported by `tsc --noUnusedLocals`.
`infuraProjectId` remains the live constant in
`shared/constants/network.ts`; only the unused import in the multichain
network selectors is removed. `ProductType` remains used by subscription
hooks; only the unused import in
`ui/selectors/subscription/subscription.ts` is removed.
Owner set: none (no CODEOWNERS match for any touched file).
| path | removed (file / symbol / class) | why dead |
| --- | --- | --- |
| `ui/selectors/multichain/networks.ts` | `infuraProjectId` import |
unused local |
| `ui/selectors/subscription/subscription.ts` | `ProductType` import |
unused local |
Whole-repo whole-word search: remaining `infuraProjectId` hits are the
live constant, its callers, and docs/fixtures. Remaining `ProductType`
hits are other files that import the type themselves. Open PRs mention
`infuraProjectId` in unrelated diffs; none edit these two files, and
none mention `ProductType`. `infuraProjectId` import blame is 2026-03-02
(file last changed 2026-08-17). `ProductType` import blame is 2025-09-24
(file last changed 2026-06-12). No user-facing behavior change.
Checks passed: `yarn lint:tsc`, eslint on the touched files, and `yarn
test:unit --coverage=false` for
`ui/selectors/multichain/networks.test.ts` and
`ui/selectors/subscription/subscription.test.ts` with no snapshot
updates.
Docs/comments updated: none
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: null
## **Related issues**
Refs: proactive dead-code cleanup (extension counterpart of
metamask-mobile#37948)
## **Manual testing steps**
N/A — deletes unreachable code. There is no user-facing behavior to
click through.
## **Screenshots/Recordings**
N/A — no UI change
### **Before**
N/A
### **After**
N/A
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Import-only cleanup with no runtime or type surface changes beyond
satisfying the compiler.
>
> **Overview**
> Removes **unused imports** flagged by `tsc --noUnusedLocals` in two
selector modules, with no logic or export changes.
>
> In `ui/selectors/multichain/networks.ts`, the **`infuraProjectId`**
import from shared network constants is dropped; the file still uses
**`CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP`**, and **`infuraProjectId`**
remains defined and used elsewhere in the repo.
>
> In `ui/selectors/subscription/subscription.ts`, the unused
**`ProductType`** import from `@metamask/subscription-controller` is
removed; subscription selectors still rely on **`PRODUCT_TYPES`**,
**`Subscription`**, and related types.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
46b2290. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>1 parent 0492f59 commit 093b11a
2 files changed
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 32 | + | |
36 | 33 | | |
37 | 34 | | |
38 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
0 commit comments