Return code object (with []byte), not string

This commit is contained in:
Ethan Frey
2020-02-07 20:31:32 +01:00
parent 678d0d7691
commit 5e67261d43

View File

@@ -5,12 +5,13 @@ import (
"encoding/hex" "encoding/hex"
"encoding/json" "encoding/json"
"fmt" "fmt"
"net/http"
"strconv"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmos/cosmos-sdk/types/rest"
"github.com/cosmwasm/wasmd/x/wasm/internal/keeper" "github.com/cosmwasm/wasmd/x/wasm/internal/keeper"
"github.com/cosmwasm/wasmd/x/wasm/internal/types" "github.com/cosmwasm/wasmd/x/wasm/internal/types"
"net/http"
"strconv"
"github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/client/context"
"github.com/gorilla/mux" "github.com/gorilla/mux"
@@ -69,7 +70,7 @@ func queryCodeHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
return return
} }
rest.PostProcessResponse(w, cliCtx, string(code.Code)) rest.PostProcessResponse(w, cliCtx, code)
} }
} }