Skip to content

chore(js-ts): Convert constants and utility files to TypeScript#612

Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1777472151-js-ts-constants
Open

chore(js-ts): Convert constants and utility files to TypeScript#612
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1777472151-js-ts-constants

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented Apr 29, 2026

Summary

Converts 9 foundational JS files (3 constants + 6 utilities) to TypeScript as part of the incremental JS→TS migration.

Constants (3 files):

  • app/constants/navigation.ts — pure string constant exports (no code changes needed)
  • app/constants/network.ts — network names, chain IDs, currency symbol mappings (no code changes needed)
  • app/constants/onboarding.ts — onboarding step constants (no code changes needed)

Utilities (6 files):

  • app/util/date/index.ts — date formatting functions, added parameter/return types
  • app/util/scaling.ts — screen scaling utilities, added ScaleOptions interface
  • app/util/dapp-url-list.ts — static DApp URL list (no code changes needed)
  • app/util/confusables/index.ts — ENS confusables detection, added parameter/return types
  • app/util/etherscan.ts — etherscan URL helpers, added parameter/return types
  • app/util/middlewares.ts — RPC middleware factories, added RpcRequest/RpcResponse interfaces

Review & Testing Checklist for Human

  • Verify app/constants/network.ts exports are still consumed correctly by downstream files (widely imported)
  • Run yarn test --findRelatedTests on a few of the converted files to confirm test compatibility

Notes

  • No logic or behavioral changes — pure type annotation migration
  • Constants files required zero code changes (TypeScript infers types from the existing constant values)
  • These are foundational files imported by many other modules, so they're high-value targets for early migration

Link to Devin session: https://app.devin.ai/sessions/51734166b8b740daa75579e47f5a94be
Requested by: @lukepage-COG


Devin Review

Status Commit
⚪ Not started

💡 Connect your GitHub account to enable automatic code reviews.

Open in Devin Review (Staging)

Convert 3 constants files:
- app/constants/navigation.ts (pure string exports)
- app/constants/network.ts (network constants, chain IDs)
- app/constants/onboarding.ts (onboarding step constants)

Convert 6 utility files:
- app/util/date/index.ts (date formatting functions)
- app/util/scaling.ts (screen scaling utilities)
- app/util/dapp-url-list.ts (DApp URL list data)
- app/util/confusables/index.ts (ENS confusables detection)
- app/util/etherscan.ts (etherscan URL helpers)
- app/util/middlewares.ts (RPC middleware factories)

All functions annotated with explicit parameter and return types.
No logic or behavioral changes.

Co-Authored-By: Luke Page <luke.page@cognition.ai>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants