From 5e67261d43d5e4e16d89a5b3f0645f5ff78aca2a Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Fri, 7 Feb 2020 20:31:32 +0100 Subject: [PATCH] Return code object (with []byte), not string --- x/wasm/client/rest/query.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/x/wasm/client/rest/query.go b/x/wasm/client/rest/query.go index 5bf49e2e..10be0fc6 100644 --- a/x/wasm/client/rest/query.go +++ b/x/wasm/client/rest/query.go @@ -5,12 +5,13 @@ import ( "encoding/hex" "encoding/json" "fmt" + "net/http" + "strconv" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmwasm/wasmd/x/wasm/internal/keeper" "github.com/cosmwasm/wasmd/x/wasm/internal/types" - "net/http" - "strconv" "github.com/cosmos/cosmos-sdk/client/context" "github.com/gorilla/mux" @@ -69,7 +70,7 @@ func queryCodeHandlerFn(cliCtx context.CLIContext) http.HandlerFunc { return } - rest.PostProcessResponse(w, cliCtx, string(code.Code)) + rest.PostProcessResponse(w, cliCtx, code) } }