fix(sdk-core): use explicit undefined check for mpcv2PartyId#8456
Merged
zahin-mohammad merged 2 commits intomasterfrom Apr 9, 2026
Merged
fix(sdk-core): use explicit undefined check for mpcv2PartyId#8456zahin-mohammad merged 2 commits intomasterfrom
zahin-mohammad merged 2 commits intomasterfrom
Conversation
Falsy check `params.mpcv2PartyId ? ... : 0` treats party ID 0 as falsy, causing `getSignatureShareRoundOne` to receive `undefined` while the `Dsg` constructor receives `0` when `mpcv2PartyId` is not supplied. Replace with an explicit undefined check to ensure both callers receive the same value. Ticket: WAL-387
6fef5f8 to
c2c3a79
Compare
Marzooqa
approved these changes
Apr 9, 2026
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
params.mpcv2PartyId ? ... : 0treats party ID0as falsy. Replace with an explicitundefinedcheck so the intent is correct and doesn't rely on the fallback coincidentally matching the desired default.Why no unit test
signRequestBaseis a private method with heavy dependencies (DklsDsg.Dsg,openpgp,DklsComms, BitGo API, wallet/coin interfaces) and zero existing test infrastructure — the mocking effort far outweighs the value for a one-line fix.0) matches the actual desired default, so the old code produced correct results in all cases. The fix makes the intent correct rather than relying on that coincidence.Test plan
yarn unit-test-changed)!== undefinedcheck is correctTicket: WAL-387