fix: address issue #252 - Unable to convert from multisig account back to regular#270
Open
domiclaw wants to merge 1 commit intohyperliquid-dex:masterfrom
Open
fix: address issue #252 - Unable to convert from multisig account back to regular#270domiclaw wants to merge 1 commit intohyperliquid-dex:masterfrom
domiclaw wants to merge 1 commit intohyperliquid-dex:masterfrom
Conversation
…sig account back to regular - Fix signatureChainId hardcoding in multi_sig() method - Fix signatureChainId hardcoding in sign_user_signed_action() - Add create_convert_from_multi_sig_user_action() helper - Document threshold limitation when authorizedUsers is empty Fixes hyperliquid-dex#252
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
This PR attempts to address issue #252 where users are unable to convert a multi‑sig account back to a regular account. The error "Invalid multi‑sig threshold" occurs when trying to submit a
convertToMultiSigUseraction with emptyauthorizedUsersandthreshold=0via themulti_sigendpoint.Changes
signatureChainIdhardcoding inExchange.multi_sig()– now uses0xa4b1for mainnet and0x66eeefor testnet.signatureChainIdhardcoding insign_user_signed_action()– defaults to mainnet/testnet chain IDs only when the field is not already present (preserves caller‑supplied values).create_convert_from_multi_sig_user_action()helper method that returns a properly formed inner action for converting a multi‑sig account to a regular account.threshold=0with emptyauthorizedUsers. The helper method allows callers to experiment withthreshold=1if needed, and the docstring explains the known limitation.Notes
threshold=0even whenauthorizedUsersis empty. This PR does not fix the backend validation; it provides a workable SDK interface and documents the issue.threshold=1(via the helper method) or contact Hyperliquid support for clarification.Fixes #252