mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-10 06:20:58 +08:00
Dev remove admin mode (#723)
* feat: remove admin mode * feat: bugfix --------- Co-authored-by: icy <icyoung520@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user