Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
LGTM. This is a small, self-contained change that adds a transfer-only speed priority, and it comes with matching validation and tests.
What I checked:
- Request shaping in
routes-test.ts.priorityis sent only for transfers set to speed. Speed is refused for deposit addresses and when combined with 1:1 delivery.pricing()always setssubsidizeexplicitly, so the proxy's default never overrides the demo's own choice. - The
RoutesTester.tsxstate wiring. Choosing speed turns off subsidy availability before the input is built, so the newpricing()checks can't throw on a normal quote. - The proxy allowlist in
routes-quote.ts. The newpriorityparam goes through the same type and length checks as the existing params, and the defaultsubsidize=trueis now skipped for speed transfers.
Extended reasoning...
The change touches the Routes tester UI, its request builder, and the docs quote proxy, adding 55 lines across 5 files. The only server-side surface is the quote proxy, which holds the docs API key. It now forwards one more allowlisted query param, under the same type and 128-character checks as the others, and it no longer adds the default subsidize=true to speed quotes. No auth, crypto, or permission logic changes, and the repository has no CODEOWNERS file. Unit tests cover the new validation, the request shaping, and the proxy's subsidize default, and there are no other reviewers' objections on the timeline. The only remaining step is the merge order the description itself points out: this PR should go in after the upstream API change that adds priority deploys.
Adds a Priority select (Best price / Speed) to the transfer quote form in the Routes tester (
/docs/routes/test). Changing it changes the quote request; no delivery times are shown.routes-test.ts: transfer quotes and creates sendpriority=speedwhen Speed is chosen; Best price sends nothing, which is the API default. Speed on deposit addresses or with 1:1 delivery is refused, matching the API's 400.RoutesTester.tsx: the select is shown for transfers only. Choosing Speed turns off 1:1 delivery for that quote.routes-quote.ts: the proxy now passesprioritythrough, and doesn't add its defaultsubsidize=trueto speed quotes.Merge after https://github.com/tempoxyz/api/pull/2165 deploys. That PR adds
priorityto/v1/routes/transfers/quoteandPOST /v1/routes/transfers.Checks:
pnpm check:typespasses, Biome passes on the changed files, andvitestpasses on routes-test and routes-quote-api (37 tests). The select was checked in the local dev server, but no live quote was requested because there was no docs quote key locally.