mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 07:26:48 +00:00
CI: Fix golangci-lint linter issues, add prealloc linter and bump version depends for Go 1.18 (#915)
* Bump CI versions * Specifically set go version as 1.17.x bumps it to 1.18 * Another * Adjust AppVeyor * Part 1 of linter issues * Part 2 * Fix various linters and improvements * Part 3 * Finishing touches * Tests and EqualFold * Fix nitterinos plus bonus requester jobs bump for exchanges with large number of tests * Fix nitterinos and bump golangci-lint timeout for AppVeyor * Address nits, ensure all books are returned on err due to syncer regression * Fix the wiggins * Fix duplication * Fix nitterinos
This commit is contained in:
@@ -101,14 +101,14 @@ func (a *Alphapoint) UpdateAccountInfo(ctx context.Context, assetType asset.Item
|
||||
return response, err
|
||||
}
|
||||
|
||||
var balances []account.Balance
|
||||
balances := make([]account.Balance, len(acc.Currencies))
|
||||
for i := range acc.Currencies {
|
||||
balances = append(balances, account.Balance{
|
||||
balances[i] = account.Balance{
|
||||
CurrencyName: currency.NewCode(acc.Currencies[i].Name),
|
||||
Total: float64(acc.Currencies[i].Balance),
|
||||
Hold: float64(acc.Currencies[i].Hold),
|
||||
Free: float64(acc.Currencies[i].Balance) - float64(acc.Currencies[i].Hold),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
response.Accounts = append(response.Accounts, account.SubAccount{
|
||||
@@ -181,18 +181,20 @@ func (a *Alphapoint) UpdateOrderbook(ctx context.Context, p currency.Pair, asset
|
||||
return orderBook, err
|
||||
}
|
||||
|
||||
orderBook.Bids = make(orderbook.Items, len(orderbookNew.Bids))
|
||||
for x := range orderbookNew.Bids {
|
||||
orderBook.Bids = append(orderBook.Bids, orderbook.Item{
|
||||
orderBook.Bids[x] = orderbook.Item{
|
||||
Amount: orderbookNew.Bids[x].Quantity,
|
||||
Price: orderbookNew.Bids[x].Price,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
orderBook.Asks = make(orderbook.Items, len(orderbookNew.Asks))
|
||||
for x := range orderbookNew.Asks {
|
||||
orderBook.Asks = append(orderBook.Asks, orderbook.Item{
|
||||
orderBook.Asks[x] = orderbook.Item{
|
||||
Amount: orderbookNew.Asks[x].Quantity,
|
||||
Price: orderbookNew.Asks[x].Price,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
orderBook.Pair = p
|
||||
|
||||
Reference in New Issue
Block a user