chore(config): make a local setup produce clickable links and a nameable failure - #207
Merged
Merged
Conversation
…ble failure Three things stood between a fresh clone and a payment you can click through. `PAYMENT_LINK_BASE_URL` was documented nowhere. Unset, the API falls back to the production default, so every link created in development came out as https://pay.useroutr.com/<code> — correct-looking, and not clickable on a machine that has no such host. Now in .env.example, pointed at the checkout app's /l route. `STELLAR_USDC_SAC_TESTNET` shipped as the literal "C...", so everyone re-derived the same public constant. Filled in with the real value, derived from USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5 and checked against the live network — calling `symbol()` on it returns "USDC". `NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID` falls back to the string "placeholder", which Reown answers with a 403. The wallet modal opens empty and the only clue is an unattributed 403 in the console, which reads like a network blip. It now warns once in development naming the variable and where to get one. The value itself still has to come from a human at cloud.reown.com — nothing here can mint it. Note the Stellar payment path does not need it. Two things found on the way: - apps/checkout had no .env.example at all, and could not have had one: the root .gitignore un-ignores `.env.example`, but each app's own .gitignore re-ignores it with a blanket `.env*`, and the more specific file wins. A new template would have been silently skipped by `git add`. Negation added to checkout, dashboard and www. - .env.example advertised CHECKOUT_URL on :3002; the app has been on :3003 since it got its own dev script. Checkout: typecheck clean, 0 lint errors, 8/8 tests. Warning verified to fire exactly once on a fresh page load, and link creation verified end to end — a link made in the dashboard now resolves at http://localhost:3003/l/<code>. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Part of #113. Three things stood between a fresh clone and a payment you can click through.
PAYMENT_LINK_BASE_URL— undocumentedNot in
.env.exampleat all. Unset, the API falls back to the production default, so every link created in development came out ashttps://pay.useroutr.com/<code>— correct-looking, and not clickable on a machine with no such host. Now documented and pointed at the checkout app's/lroute.Verified end to end: a link created in the dashboard now resolves at
http://localhost:3003/l/<code>and renders the payer page.STELLAR_USDC_SAC_TESTNET— shipped as"C..."So everyone re-derived the same public constant. Filled in with the real value, derived from
USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5and checked against the live network —symbol()on it returns"USDC".NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID— silent 403Falls back to the string
"placeholder", which Reown answers with a 403. The wallet modal opens empty and the only clue is an unattributed 403 in the console, which reads like a network blip rather than a missing variable.It now warns once in development, naming the variable and where to get one. The value itself still needs a human — create a free project at cloud.reown.com and set it in
apps/checkout/.env.local. Nothing in this PR can mint it. Note the Stellar payment path doesn't use it and works without it; only the EVM chains need it.Two things found on the way
apps/checkout had no
.env.example, and could not have had one. The root.gitignoreun-ignores.env.example, but each app's own.gitignorere-ignores it with a blanket.env*— and the more specific file wins. Any new template would have been silently skipped bygit add. Negation added to checkout, dashboard and www..env.exampleadvertisedCHECKOUT_URLon:3002. The app has been on:3003since it got its own dev script.Verification
Checkout: typecheck clean, 0 lint errors, 8/8 tests. Warning confirmed to fire exactly once on a fresh page load (a naive module-level guard fired three times — Next re-evaluates the module across routes and HMR).