Fixed stake query REST handler

This commit is contained in:
Matt Bell 2018-05-14 17:01:51 -07:00
parent 5b81938e57
commit 8e104030d5
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ func bondingStatusHandlerFn(storeName string, cdc *wire.Codec, kb keys.Keybase,
// read parameters // read parameters
vars := mux.Vars(r) vars := mux.Vars(r)
delegator := vars["delegator"] delegator := vars["delegator"]
validator := vars["validator"] candidate := vars["candidate"]
bz, err := hex.DecodeString(delegator) bz, err := hex.DecodeString(delegator)
if err != nil { if err != nil {
@ -34,7 +34,7 @@ func bondingStatusHandlerFn(storeName string, cdc *wire.Codec, kb keys.Keybase,
} }
delegatorAddr := sdk.Address(bz) delegatorAddr := sdk.Address(bz)
bz, err = hex.DecodeString(validator) bz, err = hex.DecodeString(candidate)
if err != nil { if err != nil {
w.WriteHeader(http.StatusBadRequest) w.WriteHeader(http.StatusBadRequest)
w.Write([]byte(err.Error())) w.Write([]byte(err.Error()))