From 6d7b1664c686b5bbb04dc678995b15d8aac66e81 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Thu, 7 May 2020 11:58:13 -0400 Subject: [PATCH] codec: fix account retrieval (#284) --- codec/codec.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 }