Difficulty: Intermediate
Type: bug
Background
The README states the app uses a typed configuration layer validating EXPO_PUBLIC_API_URL and EXPO_PUBLIC_CHAIN_ID at startup, throwing a "clear developer-facing error in development" if they're missing or invalid, to prevent silent fallback to production defaults.
Problem
It's not verified that these error messages are actually specific and actionable (naming the exact variable and what's wrong with it) rather than a generic "invalid config" message, and there's no indication this validation logic is covered by unit tests.
Expected outcome
Each config validation failure (missing EXPO_PUBLIC_API_URL, malformed URL, missing EXPO_PUBLIC_CHAIN_ID, non-numeric/invalid chain ID) throws a distinct, specific error identifying the variable and the problem, and this logic has unit test coverage for every case.
Suggested implementation
- Locate the config validation module (likely
src/ or a root config.ts) and review current error messages for specificity.
- Rewrite generic error messages to name the exact variable and expected format/value.
- Add a test file covering: missing
EXPO_PUBLIC_API_URL, malformed URL, missing EXPO_PUBLIC_CHAIN_ID, non-numeric chain ID, and the valid/passing case.
- Verify the error is dev-only (not shown/thrown in a way that would crash a production build if config were somehow correct at build time but the check redundantly ran).
Acceptance criteria
Likely affected files/directories
src/ (config validation module)
tests/
Difficulty: Intermediate
Type: bug
Background
The README states the app uses a typed configuration layer validating
EXPO_PUBLIC_API_URLandEXPO_PUBLIC_CHAIN_IDat startup, throwing a "clear developer-facing error in development" if they're missing or invalid, to prevent silent fallback to production defaults.Problem
It's not verified that these error messages are actually specific and actionable (naming the exact variable and what's wrong with it) rather than a generic "invalid config" message, and there's no indication this validation logic is covered by unit tests.
Expected outcome
Each config validation failure (missing
EXPO_PUBLIC_API_URL, malformed URL, missingEXPO_PUBLIC_CHAIN_ID, non-numeric/invalid chain ID) throws a distinct, specific error identifying the variable and the problem, and this logic has unit test coverage for every case.Suggested implementation
src/or a rootconfig.ts) and review current error messages for specificity.EXPO_PUBLIC_API_URL, malformed URL, missingEXPO_PUBLIC_CHAIN_ID, non-numeric chain ID, and the valid/passing case.Acceptance criteria
Likely affected files/directories
src/(config validation module)tests/