Skip to content

fix(swap-docs): correct amount types to bigint + viem helpers for v5 SDK#1332

Merged
jakehobbs merged 2 commits into
mainfrom
jake/fix-swap-docs-bigint-types
May 26, 2026
Merged

fix(swap-docs): correct amount types to bigint + viem helpers for v5 SDK#1332
jakehobbs merged 2 commits into
mainfrom
jake/fix-swap-docs-bigint-types

Conversation

@jakehobbs
Copy link
Copy Markdown
Contributor

Summary

  • SDK v5 takes bigint for fromAmount/minimumToAmount, not hex strings — fixes incorrect code snippets on the swap-tokens page
  • Replace raw bigint literals with parseEther/parseUnits from viem for readability
  • Clarify the "How do you encode values?" FAQ to distinguish JS SDK (bigint) from raw API (hex strings)

Test plan

  • Verify swap-tokens page renders correctly at /docs/wallets/transactions/swap-tokens
  • Confirm code snippets show parseEther/parseUnits imports and usage

🤖 Generated with Claude Code

The JS SDK v5 takes bigint values for fromAmount/minimumToAmount, not hex
strings. Use parseEther/parseUnits from viem for readability. Also clarify
in the FAQ that bigints apply to the SDK while hex strings apply to the raw API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

🔗 Preview Mode

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview May 26, 2026, 6:21 PM

@jakehobbs jakehobbs marked this pull request as ready for review May 26, 2026 18:19
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jakehobbs jakehobbs merged commit 8bb9b90 into main May 26, 2026
8 checks passed
@jakehobbs jakehobbs deleted the jake/fix-swap-docs-bigint-types branch May 26, 2026 18:29
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.

2 participants