Register Account interface with amino in types

This commit is contained in:
Aleksandr Bezobchuk 2018-10-04 16:12:13 -04:00
parent 4ca2b80812
commit 4171212fce

View File

@ -3,6 +3,7 @@ package types
import ( import (
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/wire" "github.com/cosmos/cosmos-sdk/wire"
"github.com/cosmos/cosmos-sdk/x/auth"
) )
var typesCodec = wire.NewCodec() var typesCodec = wire.NewCodec()
@ -15,6 +16,7 @@ func init() {
// codec. // codec.
func RegisterWire(codec *wire.Codec) { func RegisterWire(codec *wire.Codec) {
sdk.RegisterWire(codec) sdk.RegisterWire(codec)
codec.RegisterInterface((*auth.Account)(nil), nil)
codec.RegisterConcrete(&Transaction{}, "types/Transaction", nil) codec.RegisterConcrete(&Transaction{}, "types/Transaction", nil)
codec.RegisterConcrete(&Account{}, "types/Account", nil) codec.RegisterConcrete(&Account{}, "types/Account", nil)
} }