Fixed stake query REST handler
This commit is contained in:
parent
5b81938e57
commit
8e104030d5
|
@ -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()))
|
||||||
|
|
Loading…
Reference in New Issue