Repository navigation
S8.7: a missing 1Click credential is a named state, and one command proves a token - #160
Merged
Merged
Conversation
A non-dry quote needs the partner JWT; without it the vendor answers "400 Internal server error", which the pay page would have shown as the client's own mistake. The real-quote branch now checks the deployment first and answers 500 server_misconfigured (dry previews and demo mode untouched). `pnpm oneclick:check` exits 1 saying previews still work when no token exists, and with a token runs a real EXACT_OUTPUT quote and reports the signature verdict, the fee and whether an address came back; `--real` proves the address path without moving funds. Corrects the earlier "every quote is refused" record in ARCHITECTURE, README, DEPLOY, LAUNCH and tracks S8.7.
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.
What
A missing
ONECLICK_JWTused to surface as the vendor's400 Internal server erroron a real quote, which the pay page reported as the client's own mistake. It now has a name, and a token can be proven the moment it exists.lib/server/pay.ts: the real-quote branch checksdeps.oneClick.hasJwt(after the reuse/conflict checks) and throws500 server_misconfigured. Dry previews stay open, and demo mode is exempt — its transport mints the address itself and never forwards a real quote.pnpm oneclick:check(scripts/check-oneclick.ts): with no token it exits 1 saying previews still work but an address cannot be issued; with a token it runs a realEXACT_OUTPUTquote for 10.5 USDC→USDC and prints status, base units, fee, signature verdict and whether an address came back.--real <near-account>validates the address and proves the address-issuing path without moving funds. It never prints the JWT.depositAddress) answers 400 without a credential and 401 with a bogus bearer;/v0/tokensanswers either way. Corrected the earlier "every quote is refused" record inARCHITECTURE.md§3.2, README,DEPLOY.md,LAUNCH.md§1 and the S8.2 note.DEPLOY.md: "Obtaining the 1Click credential" (portal →.env.local→ check →vercel env add).AGENTS.md§5 gains the two commands.ROADMAP.mdtracks S8.7 (Phase 8 67% → 71%, overall 92.0%).Tests
server_misconfigured, zero upstream quote calls, dry preview still 200.pnpm demo).pnpm typecheck,pnpm lint,pnpm formatclean; 673 passing + 1 skipped.E2E_PORT=3217 pnpm e2e→ 5/5, including the demo "Get a payment address" step, against a production build.Closes nothing: #159 stays open as the roadmap entry, recorded by a comment after merge.