|
def sign_user_signed_action(wallet, action, payload_types, primary_type, is_mainnet): |
|
# signatureChainId is the chain used by the wallet to sign and can be any chain. |
|
# hyperliquidChain determines the environment and prevents replaying an action on a different chain. |
|
action["signatureChainId"] = "0x66eee" |
|
action["hyperliquidChain"] = "Mainnet" if is_mainnet else "Testnet" |
|
data = user_signed_payload(primary_type, payload_types, action) |
|
return sign_inner(wallet, data) |
The inline comment says signatureChainId “can be any chain”, but hardcoding a specific chain id (notably a testnet chain id) is confusing and may cause unexpected wallet UX or signing behavior for mainnet users.