UnmarshalBinaryBare expected to read prefix bytes 75FBFAB8 (since it is registered concrete) but got 0A141DFA

I got it. The account mapper’s parameter was wrong.
I’ve changed the problematic code:

	app.accountMapper = auth.NewAccountMapper(
		cdc,
		app.keyAccount,        // target store
		auth.ProtoBaseAccount, // prototype
	)

to this:

	app.accountMapper = auth.NewAccountMapper(
		cdc,
		app.keyAccount,        // target store
		func () auth.Account {
			return &types.AppAccount{}
		},
	)

So, now I can see Bob’s balance!
Hope it helps someone.

2 Likes