From 4bcd01f28e0577db4e0d68809df75e4023039f66 Mon Sep 17 00:00:00 2001 From: Marston Connell <34043723+TheMarstonConnell@users.noreply.github.com> Date: Mon, 24 Apr 2023 18:58:22 -0400 Subject: [PATCH] cleaning --- jprov/server/http.go | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/jprov/server/http.go b/jprov/server/http.go index 36e3cde..089d52d 100644 --- a/jprov/server/http.go +++ b/jprov/server/http.go @@ -60,17 +60,12 @@ func checkVersion(cmd *cobra.Command, w http.ResponseWriter, ctx *utils.Context) } chainID := clientCtx.ChainID - var v types.VersionResponse + v := types.VersionResponse{ + Version: version.Version, + ChainID: chainID, + } if len(res) > 0 { - v = types.VersionResponse{ - Version: res, - ChainID: chainID, - } - } else { - v = types.VersionResponse{ - Version: version.Version, - ChainID: chainID, - } + v.Version = res } err = json.NewEncoder(w).Encode(v)