Skip to content

fix(sendCallsSync): use getAction to respect client overrides#4315

Merged
jxom merged 2 commits intomainfrom
fix/send-calls-sync-get-action
Feb 4, 2026
Merged

fix(sendCallsSync): use getAction to respect client overrides#4315
jxom merged 2 commits intomainfrom
fix/send-calls-sync-get-action

Conversation

@jxom
Copy link
Member

@jxom jxom commented Feb 4, 2026

Summary

sendCallsSync was directly calling the imported sendCalls and waitForCallsStatus functions, bypassing any client-level overrides.

This broke smart account clients (e.g. permissionless) that override sendCalls to use user operations instead of wallet_sendCalls.

Fix

Now uses getAction() pattern consistent with writeContracts and other action compositions:

- const result = await sendCalls(client, parameters)
+ const result = await getAction(client, sendCalls, 'sendCalls')(parameters)

Fixes #4307

sendCallsSync was directly calling the imported sendCalls and
waitForCallsStatus functions, bypassing any client-level overrides.

This broke smart account clients (e.g. permissionless) that override
sendCalls to use user operations instead of wallet_sendCalls.

Now uses getAction() pattern consistent with writeContracts and other
action compositions.

Fixes #4307

Amp-Thread-ID: https://ampcode.com/threads/T-019c29f1-a4b7-7048-ba52-d38a84e42bf4
Co-authored-by: Amp <amp@ampcode.com>
@changeset-bot
Copy link

changeset-bot bot commented Feb 4, 2026

🦋 Changeset detected

Latest commit: 6bbb5c0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Feb 4, 2026

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

Project Deployment Actions Updated (UTC)
viem Ready Ready Preview, Comment Feb 4, 2026 6:55pm

Request Review

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 4, 2026

Open in StackBlitz

npm i https://pkg.pr.new/viem@4315

commit: e595b57

@jxom jxom marked this pull request as ready for review February 4, 2026 18:52
@jxom jxom merged commit 56d0920 into main Feb 4, 2026
7 of 8 checks passed
@jxom jxom deleted the fix/send-calls-sync-get-action branch February 4, 2026 18:52
@github-actions github-actions bot mentioned this pull request Feb 4, 2026
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.

sendCallsSync ignores client's overridden sendCalls action (breaks smart account clients)

1 participant