Merge pull request #11 from asalei/patch-1

remove duplicated code with func setupBotExchanges
This commit is contained in:
thrasher
2016-10-07 10:47:52 +11:00
committed by GitHub

16
main.go
View File

@@ -129,22 +129,6 @@ func main() {
log.Println("Fatal error retrieving config currency AvailablePairs. Error: ", err)
}
for _, exch := range bot.config.Exchanges {
for i := 0; i < len(bot.exchanges); i++ {
if bot.exchanges[i] != nil {
if bot.exchanges[i].GetName() == exch.Name {
bot.exchanges[i].Setup(exch)
if bot.exchanges[i].IsEnabled() {
log.Printf("%s: Exchange support: %s (Authenticated API support: %s - Verbose mode: %s).\n", exch.Name, IsEnabled(exch.Enabled), IsEnabled(exch.AuthenticatedAPISupport), IsEnabled(exch.Verbose))
bot.exchanges[i].Start()
} else {
log.Printf("%s: Exchange support: %s\n", exch.Name, IsEnabled(exch.Enabled))
}
}
}
}
}
if bot.config.Webserver.Enabled {
err := CheckWebserverValues()
if err != nil {