fix(sdk-core): pass txParams on EdDSA MPCv2 re-sign and PA paths#9061
Open
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Open
fix(sdk-core): pass txParams on EdDSA MPCv2 re-sign and PA paths#9061bitgo-ai-agent-dev[bot] wants to merge 1 commit into
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Conversation
83641a6 to
5fe3aca
Compare
EdDSA MPCv2 verifyTransaction() compares txParams.recipients to parsed tx outputs before MPC signing. On re-sign and pending-approval flows txParams was never derived, causing a "Number of tx outputs does not match number of txParams recipients" error. Add txParamsFromIntent() which maps the persisted IntentRecipient shape on txRequest.intent into the flat ITransactionRecipient shape expected by verifyTransaction callers. Wire it in two places: - recreateTxRequest: derive txParams after fetching the fresh txRequest so PA approve → auto-sign completes correctly. - signTransactionTss: when buildParams is absent (re-sign via signAndSendTxRequest), fetch the txRequest and derive txParams so UI re-sign completes correctly. Existing buildParams / sendMany paths are unchanged; the new derivation only runs when buildParams is not already present. Ticket: WCI-765 Session-Id: 1c44b40e-24c1-49b1-b454-86318c9a44a2 Task-Id: bad80f2c-73b6-4826-a6ee-49cc4344544c
5fe3aca to
f2a4114
Compare
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.
Summary
EdDSA MPCv2 TSOL signing fails on the pending-approval (PA) path with:
failed to sign transaction Error: Number of tx outputs does not match with number
of txParams recipients
Root cause: eddsaMPCv2.signRequestBase re-verifies the transaction against
txParams.recipients before DSG starts:
Solana's verifyTransaction does a strict length check:
Why ECDSA MPCv2 is unaffected: ETH's verifyTssTransaction gates its strict
recipient checks on txParams.type. Without a type, those checks are skipped and {
recipients: [] } passes silently.
Why EdDSA MPCv1 is unaffected: MPCv1's signRequestBase does not call
verifyTransaction with txParams in normal flows.
Fix
Derive txParams from the persisted txRequest.intent inside recreateTxRequest,
guarded to EdDSA MPCv2 only — matching the pattern established by WCI-505:
Ticket: WCI-765