From 4806ee83f791842a0adcf9577e5523d5e409de7e Mon Sep 17 00:00:00 2001 From: tinkle-community Date: Fri, 24 Jul 2026 15:01:53 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20respect=20Hyperliquid=20unified=20accoun?= =?UTF-8?q?ts=20=E2=80=94=20drop=20the=20spot/perp=20split=20and=20transfe?= =?UTF-8?q?r=20tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per HL's account-abstraction-modes docs, unified accounts (the default and HL's recommendation) hold ONE USDC balance that collateralizes spot, validator perps and HIP-3 perps — there is no spot/perp split and no class transfer. The panel was presenting manual-mode concepts (spot vs perp cards, a spot->perp transfer tab) to unified users: confusing and wrong. - unifiedAccount prop (from the exchange's hyperliquid_unified_account, default true): hides the transfer tab and shows a single 'Hyperliquid account' card — total / tradable / margin in use, derived from the spot balance and its hold - Manual-mode accounts keep the split cards and transfer tab - Deposit copy simplified: funds are tradable right after the bridge credit, no extra step --- .../common/HyperliquidFundsPanel.tsx | 99 +++++++++++++------ .../components/trader/ExchangeConfigModal.tsx | 1 + 2 files changed, 69 insertions(+), 31 deletions(-) diff --git a/web/src/components/common/HyperliquidFundsPanel.tsx b/web/src/components/common/HyperliquidFundsPanel.tsx index 860947d1..99731e2b 100644 --- a/web/src/components/common/HyperliquidFundsPanel.tsx +++ b/web/src/components/common/HyperliquidFundsPanel.tsx @@ -58,6 +58,14 @@ async function fetchArbitrumBalances(address: string) { interface HyperliquidFundsPanelProps { language: Language walletAddress: string + /** + * Hyperliquid "unified account" mode (the default, and HL's recommendation): + * one USDC balance collateralizes spot, validator perps and HIP-3 perps, so + * there is no spot/perp split and no class transfer — the transfer tab is + * hidden and a single account card is shown. Manual/standard-mode accounts + * keep the split view with the spot<->perp transfer. + */ + unifiedAccount?: boolean onTransferred?: () => void | Promise } @@ -71,7 +79,11 @@ const TEXT = { available: '可用', withdrawable: '可提取', depositHint: - '二维码是你的主钱包地址。第一步:把 USDC 通过 Arbitrum One 链提现/转账到这个地址(只是进钱包,不会自动进交易所)。第二步:用下方按钮把钱包里的 Arbitrum USDC 存入 Hyperliquid,约 1 分钟到账合约账户。', + '二维码是你的主钱包地址。第一步:通过 Arbitrum One 链把 USDC 转到这个地址(进钱包)。第二步:用下方按钮存入 Hyperliquid,约 1 分钟到账,到账后即可直接用于交易。', + hlAccount: 'Hyperliquid 账户', + total: '总额', + tradable: '可交易', + marginInUse: '保证金占用', depositWarn: '入金只认 Arbitrum One 上的原生 USDC。USDT 或其他链的资产需先兑换成 Arbitrum USDC。', bridgeTitle: '存入 Hyperliquid(钱包 → 交易账户)', @@ -112,7 +124,11 @@ const TEXT = { available: 'available', withdrawable: 'withdrawable', depositHint: - 'The QR is your main wallet address. Step 1: withdraw/send USDC to it on Arbitrum One (this only funds the wallet, not the exchange). Step 2: use the button below to deposit the wallet USDC into Hyperliquid — it credits the perp account in about a minute.', + 'The QR is your main wallet address. Step 1: send USDC to it on Arbitrum One (funds the wallet). Step 2: deposit into Hyperliquid with the button below — credited in about a minute and immediately tradable.', + hlAccount: 'Hyperliquid account', + total: 'Total', + tradable: 'Tradable', + marginInUse: 'Margin in use', depositWarn: 'Deposits only accept native USDC on Arbitrum One. Swap USDT or assets on other chains into Arbitrum USDC first.', bridgeTitle: 'Deposit to Hyperliquid (wallet → trading account)', @@ -149,6 +165,7 @@ const TEXT = { export function HyperliquidFundsPanel({ language, walletAddress, + unifiedAccount = true, onTransferred, }: HyperliquidFundsPanelProps) { const t = TEXT[language === 'zh' ? 'zh' : 'en'] @@ -326,18 +343,20 @@ export function HyperliquidFundsPanel({ {t.deposit} - + {!unifiedAccount && ( + + )}