feat(sdk-core): add PolyxSwitchValidatorOptions for multi-nomination #9056
Merged
Conversation
…switch TICKET: SI-842
ranga-r2
approved these changes
Jun 18, 2026
Doddanna17
reviewed
Jun 18, 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.
TICKET: SI-842
Summary
PolyxSwitchValidatorOptionsto@bitgo/sdk-corefor POLYX multi-validator nomination switch requestsIStakingWallet.switchValidator()andStakingWallet.switchValidator()to accept the new options typePolyxSwitchValidatorOptionsin the internalcreateStakingRequest()options unionPOLYX switch-validator replaces the full nomination set and does not use
validatororamount. The staking-service already accepts{ delegationId, validators }; this change aligns the SDK types with that contract so UI callers no longer needas SwitchValidatorOptions.Motivation
bitgo-ui/bitgo-retailcurrently type-assert the switch-validator payload when submitting POLYX multi-nomination requests, becauseSwitchValidatorOptionsrequiresvalidatorandamount. This follows the same approach asTaoSwitchValidatorOptionsfor coin-specific switch payloads.Changes
modules/sdk-core/src/bitgo/staking/iStakingWallet.tsPolyxSwitchValidatorOptions; updateswitchValidatorsignaturemodules/sdk-core/src/bitgo/staking/stakingWallet.tsswitchValidator+createStakingRequestunionNo runtime behavior change —
createStakingRequestalready forwards options as-is to staking-service.Follow-up (separate PRs)
After this SDK version is published and bumped:
payload as SwitchValidatorOptionsinuseCreateSwitchValidatorRequestMutation.ts; usePolyxSwitchValidatorOptionsin the payload unionTest plan
yarn compileinmodules/sdk-corestakingWalletCommonswitch-validator test still passes (no new test added — consistent with no dedicated test forTaoSwitchValidatorOptions)