staking cli UnmarshalBinary -> UnmarshalJSON

This commit is contained in:
rigelrozanski 2018-04-30 19:30:00 -04:00
parent c1daa081ef
commit 05c4bbb997
2 changed files with 3 additions and 3 deletions

View File

@ -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
}

View File

@ -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())))