Skip to content

fix(sdk-core): pass round to getBitgoSignatureShare helper#8930

Merged
vibhavgo merged 1 commit into
masterfrom
WCI-626
Jun 5, 2026
Merged

fix(sdk-core): pass round to getBitgoSignatureShare helper#8930
vibhavgo merged 1 commit into
masterfrom
WCI-626

Conversation

@vibhavgo

@vibhavgo vibhavgo commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

EdDSA MPCv2 signing can receive multiple BitGo-to-signer shares in a txRequest.
Selecting only by sender/recipient can pick a stale round-1 output during round 2.

  • Add shareType param to getBitgoSignatureShare to filter by round output type.
  • Update EdDSA MPCv2 callers to request round-1 or round-2 output explicitly.
  • Remove inline reverse().find() in offline round-3 path in favour of the helper.
  • Update tests to expect round-specific missing share error messages.

Ticket: WCI-626

@vibhavgo vibhavgo requested review from a team as code owners June 3, 2026 10:50
@linear-code

linear-code Bot commented Jun 3, 2026

Copy link
Copy Markdown

WCI-626

Comment thread modules/sdk-core/src/bitgo/tss/common.ts Outdated
@Marzooqa

Marzooqa commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

@claude

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Claude finished @Marzooqa's task —— View job


Analyzing PR and Review Comment

  • Read changed files to understand the context
  • Examine the specific line mentioned in review comment (common.ts:24)
  • Check for existing enums that could be used
  • Provide feedback on enum availability

Analysis

Looking at line 24 in common.ts, the reviewer is asking about the shareType parameter which uses a union type:

shareType: 'round1Output' | 'round2Output' | 'round3Output'

After searching the codebase, I found that these values correspond to the type field in signature share interfaces defined in @bitgo/public-types:

  • EddsaMPCv2SignatureShareRound1Output
  • EddsaMPCv2SignatureShareRound2Output
  • MPCv2SignatureShareRound1Output
  • MPCv2SignatureShareRound2Output

Answer

No, there is no existing enum for these round output types. The string literals 'round1Output', 'round2Output', and 'round3Output' are used consistently throughout the codebase as literal values in the type definitions and test assertions.

The current union type approach is appropriate here since:

  1. These values are part of the data structure format (they appear in JSON.parse(share.share).type)
  2. They need to match the type field in the signature share interfaces from @bitgo/public-types
  3. Creating an enum would require coordination with the @bitgo/public-types package

If you'd like to create an enum, it would need to be added to @bitgo/public-types first and then imported here to maintain consistency across the ecosystem.

Comment thread modules/sdk-core/src/bitgo/tss/common.ts Outdated
Comment thread modules/sdk-core/test/unit/bitgo/utils/tss/eddsa/eddsaMPCv2.ts
Ticket: WCI-626
EdDSA MPCv2 signing can receive multiple BitGo-to-signer shares in a txRequest.
Selecting only by sender/recipient can pick a stale round-1 output during round 2.
- Add shareType param to getBitgoSignatureShare to filter by round output type.
- Update EdDSA MPCv2 callers to request round-1 or round-2 output explicitly.
- Remove inline reverse().find() in offline round-3 path in favour of the helper.
- Update tests to expect round-specific missing share error messages.
@vibhavgo vibhavgo merged commit ddfc0e8 into master Jun 5, 2026
22 checks passed
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.

2 participants