mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
huobi: don't overwrite account balances when request spot asset (#785)
This commit is contained in:
@@ -662,6 +662,9 @@ func (h *HUOBI) UpdateAccountInfo(ctx context.Context, assetType asset.Item) (ac
|
||||
return info, err
|
||||
}
|
||||
for i := range accounts {
|
||||
if accounts[i].Type != "spot" {
|
||||
continue
|
||||
}
|
||||
acc.ID = strconv.FormatInt(accounts[i].ID, 10)
|
||||
balances, err := h.GetAccountBalance(ctx, acc.ID)
|
||||
if err != nil {
|
||||
@@ -746,7 +749,7 @@ func (h *HUOBI) UpdateAccountInfo(ctx context.Context, assetType asset.Item) (ac
|
||||
}
|
||||
acc.Currencies = currencyDetails
|
||||
}
|
||||
acc.AssetType = asset.Futures
|
||||
acc.AssetType = assetType
|
||||
info.Accounts = append(info.Accounts, acc)
|
||||
err := account.Process(&info)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user