Skip to content

fix(wallet): apply sendCalls dataSuffix when a call has no data - #5292

Closed
mortezashojaei wants to merge 1 commit into
wevm:mainfrom
mortezashojaei:fix/send-calls-data-suffix-no-data
Closed

mortezashojaei wants to merge 1 commit into
wevm:mainfrom
mortezashojaei:fix/send-calls-data-suffix-no-data

Conversation

@mortezashojaei

Copy link
Copy Markdown
Contributor

sendCalls only appends a call's dataSuffix when that call already has data. A call without data, like a plain value transfer, is sent with no data at all, so the suffix is silently dropped:

await sendCalls(client, {
  calls: [{ to, value: parseEther('1'), dataSuffix: '0x12345678' }],
})
// wallet_sendCalls receives: { to, value: '0xde0b6b3a7640000', data: undefined }

This is the same problem as #4343, where attribution suffixes (for example ERC-8021 builder codes) were lost on value-only transactions. #4401 fixed it for sendTransaction and #4547 aligned sendTransactionSync, but sendCalls still had the old check. It affects the wallet_sendCalls request and the eth_sendTransaction fallback, since both use the same mapped calls.

The fix appends the suffix to data ?? '0x', which matches sendTransaction, simulateBlocks and Tempo's simulate. Calls that already have data are unchanged.

Added args: dataSuffix (no data) next to the existing args: dataSuffix test. It fails on main and passes with this change, and the rest of the sendCalls tests pass unchanged.

@vercel

vercel Bot commented Oct 24, 2026

Copy link
Copy Markdown

@mortezashojaei is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Oct 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dd5aa3d

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

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

commit: dd5aa3d

jxom commented Oct 26, 2026

Copy link
Copy Markdown
Member

Thanks for the fix! Closing in favor of #5301, which keeps your commit as is and adds a fallback test and a docs note on top.


Generated by Claude Code

@jxom jxom closed this Oct 26, 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.

2 participants