mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-06 23:16:53 +00:00
Engine improvements
This commit is contained in:
@@ -299,6 +299,7 @@ func (c *Config) CheckCommunicationsConfig() {
|
||||
} else {
|
||||
c.Communications.SMSGlobalConfig = SMSGlobalConfig{
|
||||
Name: "SMSGlobal",
|
||||
From: c.Name,
|
||||
Username: "main",
|
||||
Password: "test",
|
||||
|
||||
@@ -328,6 +329,10 @@ func (c *Config) CheckCommunicationsConfig() {
|
||||
}
|
||||
|
||||
} else {
|
||||
if c.Communications.SMSGlobalConfig.From == "" {
|
||||
c.Communications.SMSGlobalConfig.From = c.Name
|
||||
}
|
||||
|
||||
if c.SMS != nil {
|
||||
// flush old SMS config
|
||||
c.SMS = nil
|
||||
@@ -931,7 +936,7 @@ func (c *Config) CheckExchangeConfigValues() error {
|
||||
c.Exchanges[i].Enabled = false
|
||||
continue
|
||||
}
|
||||
if c.Exchanges[i].API.AuthenticatedSupport {
|
||||
if c.Exchanges[i].API.AuthenticatedSupport && c.Exchanges[i].API.CredentialsValidator != nil {
|
||||
if c.Exchanges[i].API.CredentialsValidator.RequiresKey && (c.Exchanges[i].API.Credentials.Key == "" || c.Exchanges[i].API.Credentials.Key == DefaultAPIKey) {
|
||||
c.Exchanges[i].API.AuthenticatedSupport = false
|
||||
}
|
||||
|
||||
@@ -222,6 +222,7 @@ type SMSContact struct {
|
||||
// messaging and broadcast used by SMSGlobal
|
||||
type SMSGlobalConfig struct {
|
||||
Name string `json:"name"`
|
||||
From string `json:"from"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Verbose bool `json:"verbose"`
|
||||
Username string `json:"username"`
|
||||
|
||||
Reference in New Issue
Block a user