Skip to content

Env-driven config, money helpers and provider consolidation - #2050

Merged
yusuftomilola merged 2 commits into
DistinctCodes:mainfrom
memplethee-lab:feature/env-money-providers
Oct 18, 2026
Merged

yusuftomilola merged 2 commits into
DistinctCodes:mainfrom
memplethee-lab:feature/env-money-providers

Conversation

@memplethee-lab

@memplethee-lab memplethee-lab commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implements the env/config and money-handling work assigned to Memplethee-lab:

Tests

New: env, providers, robots, components page, utils additions.

Deviations from the issue prose

  • The JPY test asserts 1000 (the issue prose was inconsistent).
  • AdminCreditsManagement and the refund-form minor-unit inputs were left unconverted.
  • The robots rule for /components/ uses a trailing slash.
  • The "" API base fallback exists only for NODE_ENV=test.

Closes #1985
Closes #1984
Closes #1980
Closes #1979

…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.
@vercel

vercel Bot commented Oct 17, 2026

Copy link
Copy Markdown

@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.

@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@yusuftomilola
yusuftomilola merged commit bf9c1ef into DistinctCodes:main Oct 18, 2026
1 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment