Repository navigation
fix: reject unknown network names in the configuration - #558
Merged
Merged
Conversation
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.
Summary
Reject unsupported
NEXT_PUBLIC_NETWORKvalues during config module initialization instead of silently selecting testnet settings. Valid testnet and mainnet configurations keep their corresponding passphrases and default RPC URLs.Linked issue
Closes #515
What was tested
npx vitest run lib/config-rpc.test.ts --config vitest.issue-515.config.mts— passed, 3 tests. This used a temporary setup-free config because the repository Vitest setup cannot resolve the missing@testing-library/reactdependency; the temporary file was removed.lib/config.ts— passed.npm run lint— passed with 7 existing warnings.npm run typecheck— failed because dependencies are missing fromnode_modules:@testing-library/reactand@next/bundle-analyzer.npm test— failed before collecting tests because the global Vitest setup imports missing@testing-library/react(103 test files affected).npm run build— failed loadingnext.config.tsbecause@next/bundle-analyzeris missing.Offline dependency restoration was attempted without changing package manifests or the lockfile, but could not complete because the npm cache lacks
duplexer.Checklist
npm testpassesnpm run typecheckpassesnpm run lintpasses