Repository navigation
Conversation
…ore broadcasting it When a WalletConnect wallet returns signed bytes instead of broadcasting itself, the CLI broadcast them as they came back, although every pre-sign check had run on the transaction it sent the wallet. The send functions now take the wallet address and refuse returned bytes that are not signed by it or differ from what was sent (EVM: chain, recipient, value, calldata and gas limit; the wallet still picks nonce and fees. Solana: the same message). A signature-only Solana reply must verify. The error is SIGNED_TX_MISMATCH and says the wallet may have sent the transaction itself. A reply carrying only a hash is unchanged. Covers swaps, approvals, allowance revokes, wallet send and limit orders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kome12
marked this pull request as ready for review
November 17, 2026 08:23
kome12
changed the base branch from
feat/remote-signer-tx-checks
to
fix/privy-signed-tx-check
November 17, 2026 08:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When a WalletConnect wallet returns signed bytes instead of broadcasting itself, the CLI broadcast them as they came back. The send functions in
src/walletconnect-trading.jsnow take the wallet address and check what comes back, using the checks added in #849.A mismatch fails with
SIGNED_TX_MISMATCH. The message says the wallet may have sent the transaction itself, so check its activity before retrying. In a swap the code is kept, not replaced by the generic ambiguous-send error, and no other quote is tried. A reply carrying only a hash, where the wallet broadcast itself, is unchanged.Callers updated: swaps, approvals, allowance revokes,
wallet sendand limit orders.Why
Every pre-sign check (target, intent binding, value, fee cap, simulation) runs on the transaction sent to the wallet. Returned bytes encoding a different transaction would have been broadcast unchecked. A gas limit lower than requested would make a swap revert and still burn fees.
Before / after
SIGNED_TX_MISMATCH), nothing broadcastFollow-up to #849
limit-order.js'ssignTransaction, and this PR picks it up frommainwithout conflict.Testing
walletconnect-signed-tx.test.js: execute-level tests with the walletconnect subprocess stubbed, honest controls and substituted replies (above). The refusal tests fail without the fix.walletconnect-trading.test.js: unit tests for the refusals and the gas-limit check.🤖 Generated with Claude Code