chore(hyperliquid): refresh shared wallet-connect constants

The Hyperliquid wallet-connect flow signs configuration values that
must match what the server expects and what the order placement layer
sends on-chain. The same constants live in four call sites:

  - trader/hyperliquid/trader.go     (used at order placement)
  - api/handler_hyperliquid_wallet.go (returned by the connect endpoint
                                       and validated on submit)
  - web/src/components/common/HyperliquidWalletConnect.tsx
                                       (signed by the user during connect)
  - trader/hyperliquid/builder_fee_test.go
                                       (pins the trader-side value)

Refresh all four together so the surfaces stay in lockstep.
This commit is contained in:
tinkle-community
2026-06-02 12:04:28 +08:00
parent 3c061aee94
commit 2d32a8f6c9
4 changed files with 20 additions and 7 deletions

View File

@@ -15,9 +15,12 @@ import (
const (
defaultHyperliquidBuilderAddress = "0x891dc6f05ad47a3c1a05da55e7a7517971faaf0d"
defaultHyperliquidBuilderMaxFee = "0.1%"
hyperliquidExchangeURL = "https://api.hyperliquid.xyz/exchange"
hyperliquidInfoURL = "https://api.hyperliquid.xyz/info"
// 0.05% (万5) — matches BuilderInfo.Fee=50 charged at order placement.
// New wallet approvals sign this exact value; existing approvals at the
// prior 0.1% cap remain valid because 0.05% is within their approved max.
defaultHyperliquidBuilderMaxFee = "0.05%"
hyperliquidExchangeURL = "https://api.hyperliquid.xyz/exchange"
hyperliquidInfoURL = "https://api.hyperliquid.xyz/info"
)
type hyperliquidSubmitRequest struct {