diff --git a/libwallet/dex_interface.go b/libwallet/dex_interface.go index 0e838a411..a5432909d 100644 --- a/libwallet/dex_interface.go +++ b/libwallet/dex_interface.go @@ -30,7 +30,7 @@ type DEXClient interface { ExportSeed(pw []byte) (string, error) SyncBook(dex string, base, quote uint32) (*orderbook.OrderBook, core.BookFeed, error) Orders(filter *core.OrderFilter) ([]*core.Order, error) - ActiveOrders() (map[string][]*core.Order, map[string][]*core.InFlightOrder, error) + Active() bool Trade(pw []byte, form *core.TradeForm) (*core.Order, error) // TradeAsync is like Trade but a temporary order is returned before order // server validation. This helps handle some issues related to UI/UX where diff --git a/ui/window.go b/ui/window.go index 3361da465..04aab7ce7 100644 --- a/ui/window.go +++ b/ui/window.go @@ -198,13 +198,7 @@ func (win *Window) HandleEvents() { return } - ord, inflight, err := win.load.AssetsManager.DexClient().ActiveOrders() - if err != nil { - log.Errorf("AssetsManager.DexClient().ActiveOrders error: %v", err) - return - } - - if len(ord) == 0 && len(inflight) == 0 { + if !win.load.AssetsManager.DexClient().Active() { doShutdown() return }