From 141bc5fb1cffcd7ec191a501656e7ba8d39735ae Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Thu, 31 May 2018 01:52:07 +0200 Subject: [PATCH] amino.MarshalJSON instead of json.Marshal --- x/slashing/msg.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/x/slashing/msg.go b/x/slashing/msg.go index 72d2255d6..d2676af81 100644 --- a/x/slashing/msg.go +++ b/x/slashing/msg.go @@ -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) }