Repository navigation
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Contributor
Contributor
|
|
PR #10009 replaced the MPCv2 ECDSA message finalization POST /send with a plain GET, assuming wallet-platform always combines and delivers messages inside the final share submission. That assumption only holds for custodial wallets (walletHasCustodialUserKey gate in wallet-platform's share ingestion): for self-custodial wallets the request stays pendingDelivery/readyToCombineShares until a client POSTs /send, which is what triggers the share combine, the delivered-state transition and the signed-message Kafka publish. With the GET-only tail, the post-sign re-fetch returned an un-combined request without txHash and tripped the "Unable to find txHash" assert in signAndSendMessageTxRequest, leaving the message permanently un-combined and the dApp un-notified. Finalize messages by re-fetching first (custodial requests are already terminal and must not POST /send, which wallet-platform rejects), then POST /send to trigger the combine for self-custodial requests. If /send is rejected because the request became terminal concurrently, fall back to one more GET instead of surfacing the error.
nvjsr
force-pushed
the
nehakumari/defi-1184-mpcv2-message-finalization-send-fallback
branch
from
October 26, 2026 07:45
b753ca2 to
fa193ec
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.
Problem
Live WC E2E (retail, self-custodial MPCv2 hot wallet, EIP-712
signTypedStructuredData): re-signing after PA approval runs the full DKLS ceremony, but the message is never combined. The txRequest stayspendingDeliverywithmessages[0].state === 'readyToCombineShares'and notxHash,signAndSendMessageTxRequestthrows, the dialog errors, and the dApp is never notified.Root cause
#10009 assumed wallet-platform combines and delivers messages inside the final share submission, so it replaced the tail
POST /sendwith a plain GET. That ingestion-time combine is custodial-only (wallet-platformsignatureShares.tsgates it onwalletHasCustodialUserKey). For self-custodial wallets the request staysreadyToCombineSharesuntil a client POSTs/messages/0/send, which triggers:internalSendTxRequest→internalCombineSignatureShares(writesmessages[0].txHash)markTxRequestAsDeliveredIfAllMessagesSigned→delivered+ signed-message Kafka publishWith the GET-only tail nothing ever combines, so the SDK's post-sign assert (
wallet.ts:Unable to find txHash in signedMessageRequest.messages) fires and the request is stranded permanently. The Oct 21 evidence that motivated #10009 (signed→delivered82 ms apart) was actually the pre-#10009 SDK's own/sendround-trip, not an ingestion-time combine.Change
signRequestBasemessage tail, in order:delivered/hastxHash(custodial ingestion path), return it without POSTing/send(which wallet-platform rejects on the already-delivered request; this preserves the fix(sdk-core): finalize MPCv2 message signing via GET, not POST /send #10009 intent)./sendto trigger the combine + delivery + Kafka publish (self-custodial path)./sendrejects because the request became terminal concurrently, fall back to one more GET; genuine errors still surface.Transactions keep the unconditional
/send(broadcast). EDDSA MPCv2 already POSTs/sendand is untouched.Testing
modules/sdk-core—signRequestBase message finalization(5 passing):/sendPOST .../messages/0/send/sendrejected + request terminal concurrently → fallback GET/sendrejected + still un-combined → error surfaces/sendRefs DEFI-1184. Follow-up to #10009.