Repository navigation
chore(swaps): remove unused swaps constant exports - #47578
georgewrmarshall merged 3 commits into
Conversation
Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
Builds ready [341f5d6]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 1 warn · 🔴 3 fail)
Bundle Size Diffs
|
vinnyhoward
left a comment
There was a problem hiding this comment.
No correctness problems found
|
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. |
Builds ready [833d903]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 3 warn · 🔴 2 fail)
Bundle Size Diffs
|
Builds ready [cf9ded0]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 4 warn · 🔴 2 fail)
Bundle Size Diffs
|
|
|
No release label on PR. Adding release label release-13.57.0 on PR, as PR was added to branch 13.57.0 when release was cut. |



Description
Remove three unused swaps constant exports.
SWAPS_CHAINID_COMMON_TOKEN_PAIRandMONADstay: the pair is named from a perps-owned comment, andMONADcollides with live chain-id uses in open pull requests. Owner set:(none).No user-facing behavior change.
Docs/comments updated: none
Checks that passed:
yarn lint:tsc, eslint on the touched file,yarn test:unit --coverage=falseincludingshared/lib/swaps.utils.test.ts,shared/lib/swaps-utils.test.ts, andui/pages/swaps/swaps.util.test.js(31 suites, 449 tests, 5 snapshots passed, no snapshot updates). No stylesheets changed.Changelog
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 — no UI change
After
N/A — no UI change
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Deletes unreachable constants with no remaining imports; swaps tests and typecheck were run per the PR description.
Overview
Removes three unused exports from
shared/constants/swaps.tsas dead-code cleanup (aligned with the mobile extension counterpart).Removed:
MAX_ALLOWED_SLIPPAGE,SEPOLIA_SWAPS_TOKEN_OBJECT, andDEFAULT_ERC20_APPROVE_GAS. Sepolia swaps default token mapping is unchanged—it still usesGOERLI_SWAPS_TOKEN_OBJECTinSWAPS_CHAINID_DEFAULT_TOKEN_MAP.No runtime or UI behavior change; slippage limits and approve gas continue to be handled elsewhere in the swaps stack.
Reviewed by Cursor Bugbot for commit cf9ded0. Bugbot is set up for automated code reviews on this repo. Configure here.