From 7ba479e57a31a266aae069855ae6e4e26f58553e Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Wed, 8 Aug 2018 10:32:33 -0500 Subject: [PATCH] Merge PR #1942: Gblue1223/basecoin fix --- PENDING.md | 1 + examples/basecoin/app/app.go | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/PENDING.md b/PENDING.md index dcfa56654..6cc6ce10c 100644 --- a/PENDING.md +++ b/PENDING.md @@ -85,3 +85,4 @@ BUG FIXES * \#1666 Add intra-tx counter to the genesis validators * [tests] \#1551: Fixed invalid LCD test JSON payload in `doIBCTransfer` * \#1787 Fixed bug where Tally fails due to revoked/unbonding validator +* [basecoin] Fixes coin transaction failure and account query [discussion](https://forum.cosmos.network/t/unmarshalbinarybare-expected-to-read-prefix-bytes-75fbfab8-since-it-is-registered-concrete-but-got-0a141dfa/664/6) \ No newline at end of file diff --git a/examples/basecoin/app/app.go b/examples/basecoin/app/app.go index af8376b2c..4b1eef258 100644 --- a/examples/basecoin/app/app.go +++ b/examples/basecoin/app/app.go @@ -63,7 +63,9 @@ func NewBasecoinApp(logger log.Logger, db dbm.DB, baseAppOptions ...func(*bam.Ba app.accountMapper = auth.NewAccountMapper( cdc, app.keyAccount, // target store - auth.ProtoBaseAccount, // prototype + func () auth.Account { + return &types.AppAccount{} + }, ) app.coinKeeper = bank.NewKeeper(app.accountMapper) app.ibcMapper = ibc.NewMapper(app.cdc, app.keyIBC, app.RegisterCodespace(ibc.DefaultCodespace)) @@ -100,9 +102,9 @@ func MakeCodec() *wire.Codec { sdk.RegisterWire(cdc) bank.RegisterWire(cdc) ibc.RegisterWire(cdc) + auth.RegisterWire(cdc) - // register custom types - cdc.RegisterInterface((*auth.Account)(nil), nil) + // register custom type cdc.RegisterConcrete(&types.AppAccount{}, "basecoin/Account", nil) cdc.Seal()