diff --git a/config.go b/config.go index 743c7c0f..43e12506 100644 --- a/config.go +++ b/config.go @@ -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 } diff --git a/config_encryption.go b/config_encryption.go index 1145e560..015067c7 100644 --- a/config_encryption.go +++ b/config_encryption.go @@ -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 {