Repository navigation
Env-driven config, money helpers and provider consolidation - #2050
Merged
yusuftomilola merged 2 commits intoOct 18, 2026
Merged
yusuftomilola merged 2 commits into
yusuftomilola merged 2 commits into
Conversation
…nts page (Memplethee-lab) - Document required env vars in .env.example and validate NEXT_PUBLIC_API_URL once in lib/env.ts, defaulting to http://localhost:6000 in development and aligning CI and README with the same port (Closes DistinctCodes#1985) - Add shared fromMinorUnits/minorUnitDecimals helpers in lib/utils.ts and use them on the usage, payments, credits and admin money surfaces so amounts use the currency's real exponent including 7-decimal XLM (Closes DistinctCodes#1984) - Consolidate to a single Providers component (theme + query client + toaster), skip retries and surface an expiry toast for 401/403 errors, and render React Query devtools only in development (Closes DistinctCodes#1980) - Gate the /components design-review page behind non-production via notFound() and disallow it in robots.txt (Closes DistinctCodes#1979) Coordination notes for reviewers: - Session-clearing/redirect on 401 itself lands with the 401-handling PR (DistinctCodes#1977 by ykargeee-bit); this PR only wires retry-skip + toast into the one query client so the two PRs do not edit the same provider files twice. - lib/env.ts intentionally does NOT touch the API modules' auth headers; the cookie-session refactor (DistinctCodes#1975/DistinctCodes#1976) cannot merge conflicts with this PR.
|
@memplethee-lab is attempting to deploy a commit to the naijabuz's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@memplethee-lab Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…he cookie session model
1 task
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
Implements the env/config and money-handling work assigned to Memplethee-lab:
lib/env.tswith zod validation;getApiBaseUrldev defaulthttp://localhost:6000; legacy""fallback whenNODE_ENV=test; CI port 301 to 6000; README Configuration section;.gitignoreexception for.env.example.fromMinorUnits/minorUnitDecimalsinlib/utils.ts, applied on usage, payments (+[id]/return), credits, admin pages and wallet-status-card.Providersinlib/providers/providers.tsx(retry-skip auth errors, toast, dev-only devtools, exportedisAuthError); deletedlib/providers.tsx+lib/query-provider.tsx./componentsnotFound() gate + robots/components/.Tests
New: env, providers, robots, components page, utils additions.
Deviations from the issue prose
AdminCreditsManagementand the refund-form minor-unit inputs were left unconverted./components/uses a trailing slash.""API base fallback exists only forNODE_ENV=test.Closes #1985
Closes #1984
Closes #1980
Closes #1979