Skip to content

Commit

Permalink
fixup! Exchanges: Abstract exchange Start() and Run()
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Jan 30, 2024
1 parent d99caa2 commit 3cccf3c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions exchanges/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -1887,13 +1887,17 @@ func Bootstrap(ctx context.Context, b IBotExchange) error {
}

if b.IsVerbose() {
wsURL := ""
wsEnabled := false
if w, err := b.GetWebsocket(); err != nil {
wsURL = w.GetWebsocketURL()
wsEnabled = w.IsEnabled()
if b.GetSupportedFeatures().Websocket {
wsURL := ""
wsEnabled := false
if w, err := b.GetWebsocket(); err == nil {
wsURL = w.GetWebsocketURL()
wsEnabled = w.IsEnabled()
}
log.Debugf(log.ExchangeSys, "%s Websocket: %s. (url: %s)", b.GetName(), common.IsEnabled(wsEnabled), wsURL)
} else {
log.Debugf(log.ExchangeSys, "%s Websocket: Unsupported", b.GetName())
}
log.Debugf(log.ExchangeSys, "%s Websocket: %s. (url: %s).\n", b.GetName(), common.IsEnabled(wsEnabled), wsURL)
b.PrintEnabledPairs()
}

Expand Down

0 comments on commit 3cccf3c

Please sign in to comment.