diff --git a/x/stake/client/cli/query.go b/x/stake/client/cli/query.go index 145333e48..bb2a2b8db 100644 --- a/x/stake/client/cli/query.go +++ b/x/stake/client/cli/query.go @@ -74,7 +74,7 @@ func GetCmdQueryCandidate(storeName string, cdc *wire.Codec) *cobra.Command { // parse out the candidate candidate := new(stake.Candidate) - err = cdc.UnmarshalBinary(res, candidate) + err = cdc.UnmarshalJSON(res, candidate) if err != nil { return err } @@ -122,7 +122,7 @@ func GetCmdQueryDelegatorBond(storeName string, cdc *wire.Codec) *cobra.Command // parse out the bond bond := new(stake.DelegatorBond) - err = cdc.UnmarshalBinary(res, bond) + err = cdc.UnmarshalJSON(res, bond) if err != nil { return err } diff --git a/x/stake/client/rest/query.go b/x/stake/client/rest/query.go index 8eb0e03ce..22175d75a 100644 --- a/x/stake/client/rest/query.go +++ b/x/stake/client/rest/query.go @@ -59,7 +59,7 @@ func BondingStatusHandlerFn(storeName string, cdc *wire.Codec, kb keys.Keybase, } var bond stake.DelegatorBond - err = cdc.UnmarshalBinary(res, &bond) + err = cdc.UnmarshalJSON(res, &bond) if err != nil { w.WriteHeader(http.StatusInternalServerError) w.Write([]byte(fmt.Sprintf("Couldn't decode bond. Error: %s", err.Error())))