Skip to content

docs(routes): show FX values in the swap guide's request samples - #1140

Merged
JasonwLi merged 5 commits into
mainfrom
docs/routes-fx-examples
Nov 13, 2026
Merged

JasonwLi merged 5 commits into
mainfrom
docs/routes-fx-examples

Conversation

@JasonwLi

Copy link
Copy Markdown
Contributor

The Swap currencies guide embedded the generic API reference samples, so its request samples showed a cross-chain USDC transfer and a closePair access change instead of an FX swap and a list change.

Changes

src/pages/docs/routes/fx.mdx:

  • Get a quote: the playground now presets OUSD to EURC.e on Tempo, with the same account as sender and recipient, through the query prop.
  • Create the transfer: a curl request with the FX body replaces the playground, which can't preset a request body.
  • Prepare the change: a curl setMembers request replaces the playground, whose default sample closed a pair.

Checks

pnpm check, pnpm check:types, pnpm test, pnpm build and pnpm check:markdown pass. The built Markdown export shows the FX quote sample.

@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
tempo-docs Ready Ready Preview Nov 13, 2026 11:28pm UTC

Request Review

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Beyond the inline finding, I checked two more things and found no problems. The source and destination token addresses match OUSD and EURC.e as listed in src/pages/docs/routes/examples/fx.mdx:17. The curl headers (tempo-api-key, idempotency-key) match the ones used in src/pages/docs/routes/api-setup.mdx and src/lib/routes-execution.ts.

Extended reasoning...

This is a docs-only change to src/pages/docs/routes/fx.mdx, and it touches no security-sensitive code. The token addresses and header names in the new samples agree with other sources in the repo.

Comment thread src/pages/docs/routes/fx.mdx Resolved

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This is a docs-only update to the FX guide's request samples, and the latest commit resolves my earlier point about the dummy quote account by telling readers to send their listed account instead.

What was reviewed:

  • The token addresses: OUSD is 0x20c0…6a37da5c996874be and EURC.e is 0x20c0…1621e21f71cf12fb, which matches routes/examples/fx.mdx. That page also says 1000000 base units is 1 OUSD, so the "1 OUSD" sentence is right.
  • The endpoint paths (POST /v1/routes/transfers, POST /v1/prop-amms/<POOL_ADDRESS>/access/prepare) and the tempo-api-key and idempotency-key headers match the existing examples and e2e tests. The request bodies match examples/fx.mdx.
  • Other pages already pass query to OpenApi.Playground (for example accounts/fund.mdx). The new code fences use bash [Terminal], and placeholders use <UPPER_SNAKE>.
  • Not done: I didn't run the build or the Markdown export check. Everything above was checked by reading only.
Extended reasoning...

This change touches one docs page, src/pages/docs/routes/fx.mdx. It prefills the quote playground, replaces two playgrounds with curl examples, and adds one sentence of prose. It doesn't touch any code, auth or other security-sensitive surface. Token addresses, amounts, endpoint paths and headers all match existing repo sources such as routes/examples/fx.mdx and e2e/routes-demo.test.ts. No CODEOWNERS file covers the path, and my only prior comment was addressed in commit f9de8be.

@JasonwLi
JasonwLi merged commit e8f91d4 into main Nov 13, 2026
16 checks passed
@JasonwLi
JasonwLi deleted the docs/routes-fx-examples branch November 13, 2026 23:33

This branch was successfully deployed

1 active deployment
Preview — f9de8bef Deployed Nov 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant