Skip to content

fix: address issue #252 - Unable to convert from multisig account back to regular#270

Open
domiclaw wants to merge 1 commit intohyperliquid-dex:masterfrom
kyaky:fix/issue-252
Open

fix: address issue #252 - Unable to convert from multisig account back to regular#270
domiclaw wants to merge 1 commit intohyperliquid-dex:masterfrom
kyaky:fix/issue-252

Conversation

@domiclaw
Copy link

@domiclaw domiclaw commented Mar 2, 2026

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 convertToMultiSigUser action with empty authorizedUsers and threshold=0 via the multi_sig endpoint.

Changes

  1. Fixed signatureChainId hardcoding in Exchange.multi_sig() – now uses 0xa4b1 for mainnet and 0x66eee for testnet.
  2. Fixed signatureChainId hardcoding in sign_user_signed_action() – defaults to mainnet/testnet chain IDs only when the field is not already present (preserves caller‑supplied values).
  3. Added 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.
  4. Documented the threshold limitation – the backend currently rejects threshold=0 with empty authorizedUsers. The helper method allows callers to experiment with threshold=1 if needed, and the docstring explains the known limitation.

Notes

  • The root cause appears to be backend validation that does not accept threshold=0 even when authorizedUsers is empty. This PR does not fix the backend validation; it provides a workable SDK interface and documents the issue.
  • Users who encounter "Invalid multi‑sig threshold" are advised to try threshold=1 (via the helper method) or contact Hyperliquid support for clarification.
  • The changes are backward‑compatible and all existing tests pass.

Fixes #252

…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
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.

Unable to convert from multisig account back to regular

1 participant