mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-05 07:26:47 +00:00
orderbook: consolidate slice array types to orderbook package (#1992)
* orderbook: consolidate slice array types to orderbook package * Update exchanges/bybit/bybit_types.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * linter: fix and add test * cranktakular: nits * cranktakular: nits * Update exchanges/orderbook/orderbook_types.go Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com> * Update exchanges/gateio/gateio_test.go Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com> * gk: nits consolidation * gk: rm unifySpotOrderbook func * gk: nit but different * linter: fix * gk: nits * glorious: nits * Update exchanges/binance/binance.go Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> * Update exchanges/binance/binance_cfutures.go Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> * Update exchanges/binanceus/binanceus.go Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> * thrasher-:nits * thrasher-: more nit --------- Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com> Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
This commit is contained in:
@@ -197,7 +197,7 @@ func TestGetOrderbook(t *testing.T) {
|
||||
ob, err := e.GetOrderbook(t.Context(), currency.BTC.String()+currency.USD.String())
|
||||
require.NoError(t, err, "GetOrderbook must not error")
|
||||
assert.NotEmpty(t, ob.Timestamp, "Timestamp should not be empty")
|
||||
for i, o := range [][]OrderbookBase{ob.Asks, ob.Bids} {
|
||||
for i, o := range [][]orderbook.Level{ob.Asks, ob.Bids} {
|
||||
s := []string{"Ask", "Bid"}[i]
|
||||
if assert.NotEmptyf(t, o, "Should have items in %ss", s) {
|
||||
a := o[0]
|
||||
|
||||
Reference in New Issue
Block a user