Dev remove admin mode (#723)

* feat: remove admin mode
* feat: bugfix
---------
Co-authored-by: icy <icyoung520@gmail.com>
This commit is contained in:
Icyoung
2025-11-07 23:37:23 +08:00
committed by GitHub
parent 9ad3e99645
commit 062184054d
16 changed files with 160 additions and 180 deletions

View File

@@ -89,7 +89,7 @@ func NewHyperliquidTrader(privateKeyHex string, walletAddr string, testnet bool)
// Only check if using separate Agent wallet (not when main wallet is used as agent)
if !strings.EqualFold(walletAddr, agentAddr) {
agentState, err := exchange.Info().UserState(ctx, agentAddr)
if err == nil && agentState != nil && agentState.CrossMarginSummary != nil {
if err == nil && agentState != nil && agentState.CrossMarginSummary.AccountValue != "" {
// Parse Agent wallet balance
agentBalance, _ := strconv.ParseFloat(agentState.CrossMarginSummary.AccountValue, 64)