chore: delete dead code (legacy interface, diagnostics, unused config)#28
Open
dawsbot wants to merge 1 commit into
Open
chore: delete dead code (legacy interface, diagnostics, unused config)#28dawsbot wants to merge 1 commit into
dawsbot wants to merge 1 commit into
Conversation
Three unrelated bits of dead code removed together: - pages/api/chain-info/[chainId]/[evmAddress].ts: drop the ~1720-line legacy Covalent `APIResponse` interface that was kept "for reference" but is no longer referenced anywhere. The live handler is untouched. - components/contract/SendTokens.tsx: remove the `[drain]` DIAGNOSTIC console.log/console.error statements, plus the now-unused `useChainId` and `useCapabilities` hooks (and their imports) that only fed them. - config.ts: delete the vestigial NETWORK_ID = 31337 / localhost config; grep confirms nothing imports it. Build, typecheck, and lint all pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removes three unrelated pieces of dead code:
pages/api/chain-info/[chainId]/[evmAddress].ts— deletes the ~1720-line legacy CovalentAPIResponseinterface that was explicitly kept "for reference but no longer used." The live handler (~64 lines) is untouched. File shrinks from 1788 → 64 lines.components/contract/SendTokens.tsx— removes the[drain]DIAGNOSTICconsole.log/console.errorstatements. Their only consumers were theuseChainIdanduseCapabilitieshooks, which are now removed too (along with their imports) since nothing else references them.config.ts— deletes the vestigialNETWORK_ID = 31337/NETWORK_NAME = 'localhost'config.grepacross the codebase confirms nothing importsNETWORK_ID,NETWORK_NAME, or the module itself.Why
Dead code is misleading to read and maintain — the legacy interface in particular is a huge distraction in a file whose live logic is tiny, and the diagnostic logs were leftover debugging noise shipping to users' consoles.
Verification
tsc --noEmitcleaneslint .cleannext buildsucceeds🤖 Generated with Claude Code