diff --git a/docs/core/examples/app1.go b/docs/core/examples/app1.go index df5c57eb9..cf98978b0 100644 --- a/docs/core/examples/app1.go +++ b/docs/core/examples/app1.go @@ -35,7 +35,7 @@ func NewApp1(logger log.Logger, db dbm.DB) *bapp.BaseApp { // Register message routes. // Note the handler gets access to the account store. app.Router(). - AddRoute("bank", NewApp1Handler(keyAccount)) + AddRoute("send", NewApp1Handler(keyAccount)) // Mount stores and load the latest state. app.MountStoresIAVL(keyAccount) @@ -65,7 +65,7 @@ func NewMsgSend(from, to sdk.Address, amt sdk.Coins) MsgSend { } // Implements Msg. -func (msg MsgSend) Type() string { return "bank" } +func (msg MsgSend) Type() string { return "send" } // Implements Msg. Ensure the addresses are good and the // amount is positive. @@ -155,7 +155,7 @@ func handleMsgSend(ctx sdk.Context, key *sdk.KVStoreKey, msg MsgSend) sdk.Result var acc2 account if bz == nil { // Receiver account does not already exist, create a new one. - acc2 = account{Address: msg.To} + acc2 = account{} } else { // Receiver account already exists. Retrieve and decode it. err = json.Unmarshal(bz, &acc2) @@ -184,9 +184,7 @@ func handleMsgSend(ctx sdk.Context, key *sdk.KVStoreKey, msg MsgSend) sdk.Result } type account struct { - Address sdk.Address `json:"address"` Coins sdk.Coins `json:"coins"` - SequenceNumber int64 `json:"sequence"` } //------------------------------------------------------------------