mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-19 07:26:49 +00:00
Use ConfirmConfigJSON function
This commit is contained in:
@@ -214,7 +214,7 @@ func ReadConfig() error {
|
||||
}
|
||||
|
||||
if !ConfirmECS(file) {
|
||||
err := json.Unmarshal(file, &bot.config)
|
||||
err = ConfirmConfigJSON(file, &bot.config)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -240,7 +240,7 @@ func ReadConfig() error {
|
||||
return err
|
||||
}
|
||||
|
||||
err = json.Unmarshal(data, &bot.config)
|
||||
err = ConfirmConfigJSON(data, &bot.config)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -96,8 +96,8 @@ func DecryptConfigFile(configData, key []byte) ([]byte, error) {
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func ConfirmWalletJSON(file []byte, result interface{}) error {
|
||||
return JSONDecode(file, result)
|
||||
func ConfirmConfigJSON(file []byte, result interface{}) error {
|
||||
return JSONDecode(file, &result)
|
||||
}
|
||||
|
||||
func ConfirmECS(file []byte) bool {
|
||||
|
||||
Reference in New Issue
Block a user