diff --git a/x/ante/batch.go b/x/ante/batch.go index f31fa6137..28d47d45d 100644 --- a/x/ante/batch.go +++ b/x/ante/batch.go @@ -44,11 +44,6 @@ func NewBatchDecorator(cdc codec.Codec) BatchDecorator { func (b BatchDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { msgs := tx.GetMsgs() - feeTx, ok := tx.(sdk.FeeTx) - if !ok { - return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "tx must be a FeeTx") - } - var unwrappedMsgs []sdk.Msg start := 0 for i, msg := range msgs { @@ -70,5 +65,10 @@ func (b BatchDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, ne return next(ctx, tx, simulate) } + feeTx, ok := tx.(sdk.FeeTx) + if !ok { + return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "tx must be a FeeTx") + } + return next(ctx, txWithUnwrappedMsgs{feeTx, unwrappedMsgs}, simulate) }