From 5347ea8fa94a38b6a10bf03701605a5569308442 Mon Sep 17 00:00:00 2001 From: Adrian Gallagher Date: Sun, 5 Mar 2017 19:53:52 +1100 Subject: [PATCH] Use ConfirmConfigJSON function --- config.go | 4 ++-- config_encryption.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 {