Skip to content

fix: validate eth_sendTransaction response is a tx hash not a signature#263

Open
ygd58 wants to merge 1 commit intobase:masterfrom
ygd58:fix/eth-sendtransaction-validate-tx-hash
Open

fix: validate eth_sendTransaction response is a tx hash not a signature#263
ygd58 wants to merge 1 commit intobase:masterfrom
ygd58:fix/eth-sendtransaction-validate-tx-hash

Conversation

@ygd58
Copy link
Copy Markdown

@ygd58 ygd58 commented Apr 3, 2026

Problem

When using the baseAccount wagmi connector, eth_sendTransaction sometimes returns a 65-byte ECDSA signature instead of a standard 32-byte transaction hash. This causes waitForTransactionReceipt() to fail with:

InvalidParamsRpcError: invalid argument 0: hex string has length 130, want 64 for common.Hash

Root Cause

In handleResponse(), eth_sendTransaction fell through to the default case with no validation.

Fix

Added validation in handleResponse() that checks the response is a valid 32-byte tx hash (66 hex chars). If the popup returns a signature instead, a clear error is thrown immediately.

Testing

74/74 tests passed

Closes #251

@cb-heimdall
Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@ygd58
Copy link
Copy Markdown
Author

ygd58 commented Apr 14, 2026

@fan-zhang-sv @spencerstock Could you please review this PR? It adds validation for eth_sendTransaction response. Thanks!

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.

[bug] eth_sendTransaction returns 65-byte ECDSA signature instead of tx hash via wagmi baseAccount connector

2 participants