codec: fix account retrieval (#284)

This commit is contained in:
Federico Kunze 2020-05-07 11:58:13 -04:00 committed by GitHub
parent 9d208e165b
commit 6d7b1664c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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