amino.MarshalJSON instead of json.Marshal

This commit is contained in:
Christopher Goes 2018-05-31 01:52:07 +02:00
parent 3d37d51795
commit 141bc5fb1c
No known key found for this signature in database
GPG Key ID: E828D98232D328D3
1 changed files with 4 additions and 3 deletions

View File

@ -1,11 +1,12 @@
package slashing
import (
"encoding/json"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/wire"
)
var cdc = wire.NewCodec()
// name to identify transaction types
const MsgType = "slashing"
@ -29,7 +30,7 @@ func (msg MsgUnrevoke) GetSigners() []sdk.Address { return []sdk.Address{msg.Val
// get the bytes for the message signer to sign on
func (msg MsgUnrevoke) GetSignBytes() []byte {
b, err := json.Marshal(msg)
b, err := cdc.MarshalJSON(msg)
if err != nil {
panic(err)
}