Skip to content

fix: support viem auto-swap calls#606

Merged
brendanjryan merged 1 commit into
mainfrom
brendanjryan/fix-viem-auto-swap
Jul 1, 2026
Merged

fix: support viem auto-swap calls#606
brendanjryan merged 1 commit into
mainfrom
brendanjryan/fix-viem-auto-swap

Conversation

@brendanjryan

Copy link
Copy Markdown
Collaborator

Motivation

viem@>=2.54 changed Tempo call builders to require a client-first call shape. The charge transfer path was updated in 0.8.3, but auto-swap still built the DEX buy call with the old single-argument shape.

Summary

  • Added a client-aware DEX buy call builder for Tempo auto-swap.
  • Hardened token metadata decimal handling for account balance display.
  • Added coverage for viem client-first auto-swap builders and metadata decimal fallback.

Key design considerations

  • Kept compatibility with both old and new Tempo call builder shapes.
  • Matched the existing helper pattern already used for token balance and approve builders.
  • Preserved the current balance display fallback behavior when token metadata is unavailable.

@pkg-pr-new

pkg-pr-new Bot commented Jul 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/mppx@606

commit: 58e5a0a

@brendanjryan brendanjryan marked this pull request as ready for review July 1, 2026 21:01
@brendanjryan brendanjryan merged commit 3136195 into main Jul 1, 2026
20 checks passed
@brendanjryan brendanjryan deleted the brendanjryan/fix-viem-auto-swap branch July 1, 2026 21:01
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