Skip to content

Commit

Permalink
Use core.Active to check or active order
Browse files Browse the repository at this point in the history
Signed-off-by: Philemon Ukane <[email protected]>
  • Loading branch information
ukane-philemon committed Nov 19, 2024
1 parent a63b36c commit d4b7aad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion libwallet/dex_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions ui/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit d4b7aad

Please sign in to comment.