staking cli UnmarshalBinary -> UnmarshalJSON
This commit is contained in:
parent
c1daa081ef
commit
05c4bbb997
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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())))
|
||||
|
|
Loading…
Reference in New Issue