TransferHandlerFn -> NewHandler

This commit is contained in:
Ethan Buchman 2018-01-12 17:32:04 -05:00 committed by Jae Kwon
parent 5f76febce8
commit 2d56729a1f
1 changed files with 2 additions and 3 deletions

View File

@ -4,10 +4,9 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
func TransferHandlerFn(key sdk.SubstoreKey, newAccStore func(sdk.KVStore) sdk.AccountStore) sdk.Handler {
return func(ctx sdk.Context, tx sdk.Tx) sdk.Result {
func NewHandler(accStore sdk.AccountStore) sdk.Handler {
accStore := newAccStore(ctx.KVStore(key))
return func(ctx sdk.Context, tx sdk.Tx) sdk.Result {
cs := CoinStore{accStore}
sendTx, ok := tx.(sdk.Msg).(SendMsg)