From 53f86fe2f15cf8aac082c91f1966b3f7d2eb8ae4 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Thu, 13 Jan 2022 13:31:08 -0400 Subject: [PATCH] fix: nodeconfig unmarshaling (#2488) --- VERSION | 2 +- multiaccounts/accounts/database.go | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 9188543ea..a16a6df5f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.93.0 +0.93.1 diff --git a/multiaccounts/accounts/database.go b/multiaccounts/accounts/database.go index 3e0bf6c6e..aca16da22 100644 --- a/multiaccounts/accounts/database.go +++ b/multiaccounts/accounts/database.go @@ -313,7 +313,16 @@ func (db *Database) SaveSetting(setting string, value interface{}) error { value = &sqlite.JSONBlob{Data: value} update, err = db.db.Prepare("UPDATE settings SET networks = ? WHERE synthetic_id = 'id'") case "node-config": - nodeConfig := value.(params.NodeConfig) + var jsonString []byte + jsonString, err = json.Marshal(value) + if err != nil { + return err + } + var nodeConfig params.NodeConfig + err = json.Unmarshal(jsonString, &nodeConfig) + if err != nil { + return err + } if err = nodecfg.SaveNodeConfig(db.db, &nodeConfig); err != nil { return err }