diff --git a/codec/codec.go b/codec/codec.go index f9215a05..151bed26 100644 --- a/codec/codec.go +++ b/codec/codec.go @@ -7,6 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" authexported "github.com/cosmos/cosmos-sdk/x/auth/exported" "github.com/cosmos/cosmos-sdk/x/auth/vesting" @@ -67,7 +68,6 @@ func (c *Codec) UnmarshalAccountJSON(bz []byte) (authexported.Account, error) { return acc.GetAccount(), nil } -// ---------------------------------------------------------------------------- // MakeCodec registers the necessary types and interfaces for an sdk.App. This // codec is provided to all the modules the application depends on. // @@ -84,5 +84,9 @@ func MakeCodec(bm module.BasicManager) *codec.Codec { eminttypes.RegisterCodec(cdc) keyring.RegisterCodec(cdc) // temporary. Used to register keyring.Info + // since auth client doesn't use the ethermint account type, we need to set + // our codec instead. + authclient.Codec = NewAppCodec(cdc) + return cdc }