Skip to content

fix: reject unknown network names in the configuration - #558

Merged
Glittersup merged 1 commit into
TricklePay:mainfrom
Adedayo0101:fix/issue-515
Oct 26, 2026
Merged

Glittersup merged 1 commit into
TricklePay:mainfrom
Adedayo0101:fix/issue-515

Conversation

@Adedayo0101

Copy link
Copy Markdown
Contributor

Summary

Reject unsupported NEXT_PUBLIC_NETWORK values 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

  • Focused configuration test: 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/react dependency; the temporary file was removed.
  • Focused TypeScript check for lib/config.ts — passed.
  • Changed-file ESLint — passed.
  • npm run lint — passed with 7 existing warnings.
  • npm run typecheck — failed because dependencies are missing from node_modules: @testing-library/react and @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 loading next.config.ts because @next/bundle-analyzer is 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 test passes
  • npm run typecheck passes
  • npm run lint passes
  • Tested locally in the browser (where the change touches UI)

@Glittersup
Glittersup merged commit b0d4c83 into TricklePay:main Oct 26, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fail at startup on an unknown NEXT_PUBLIC_NETWORK

2 participants