Skip to content

fix(batch): emit void for registerContract results over the wire - #60

Merged
Thunkar merged 1 commit into
mainfrom
gj/update-to-v5-stable
Jul 13, 2026
Merged

fix(batch): emit void for registerContract results over the wire#60
Thunkar merged 1 commit into
mainfrom
gj/update-to-v5-stable

Conversation

@Thunkar

@Thunkar Thunkar commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

The v5 Wallet interface makes registerContract return void, and the SDK's batch output schema validates each registerContract result as z.void().optional(). The batch handler was forwarding the operation's internal return value — the contract instance, which we keep as the "already registered" early-return sentinel — as the wire result, so an app batching registerContract calls rejected the response with "expected void" (invalid_type) zod errors, one per batched item.

Emit undefined as the batch wire result for registerContract. The standalone registerContract path already returns void, and registerContract is the only batchable method whose wallet-interface return type is void.

The v5 Wallet interface makes registerContract return void, and the SDK's
batch output schema validates each registerContract result as
z.void().optional(). The batch handler was forwarding the operation's
internal return value — the contract instance, which we keep as the
"already registered" early-return sentinel — as the wire result, so an app
batching registerContract calls rejected the response with "expected void"
(invalid_type) zod errors, one per batched item.

Emit undefined as the batch wire result for registerContract. The standalone
registerContract path already returns void, and registerContract is the only
batchable method whose wallet-interface return type is void.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Thunkar
Thunkar merged commit 6ce4674 into main Jul 13, 2026
8 checks passed
@github-actions

Copy link
Copy Markdown

🚀 Web wallet deployed!

Preview URL: https://demo-wallet-qoipncu0e-thunkars-projects.vercel.app

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