mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 15:11:03 +00:00
General fixes for CancelAllOrders exchange wrapper function (#313)
* General fixes for CancelAllOrders * Fix error shadowing issue * Initialise order status map and rm reduntant initialisations
This commit is contained in:
committed by
Adrian Gallagher
parent
416fbbd5ae
commit
a80acb16de
@@ -239,7 +239,6 @@ func (z *ZB) CancelAllOrders(_ *exchange.OrderCancellation) (exchange.CancelAllO
|
||||
}
|
||||
var allOpenOrders []Order
|
||||
for _, currency := range z.GetEnabledCurrencies() {
|
||||
var pageNumber int64
|
||||
// Limiting to 10 pages
|
||||
for i := 0; i < 10; i++ {
|
||||
openOrders, err := z.GetUnfinishedOrdersIgnoreTradeType(exchange.FormatExchangeCurrency(z.Name, currency).String(), 1, 10)
|
||||
@@ -252,7 +251,6 @@ func (z *ZB) CancelAllOrders(_ *exchange.OrderCancellation) (exchange.CancelAllO
|
||||
}
|
||||
|
||||
allOpenOrders = append(allOpenOrders, openOrders...)
|
||||
pageNumber++
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user