Skip to content

Commit

Permalink
reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
haiyizxx committed Mar 25, 2024
1 parent edd4185 commit fb9b367
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions x/ante/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -70,5 +65,10 @@ func (b BatchDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, ne
return next(ctx, tx, simulate)

Check warning on line 65 in x/ante/batch.go

View check run for this annotation

Codecov / codecov/patch

x/ante/batch.go#L65

Added line #L65 was not covered by tests
}

feeTx, ok := tx.(sdk.FeeTx)
if !ok {
return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "tx must be a FeeTx")

Check warning on line 70 in x/ante/batch.go

View check run for this annotation

Codecov / codecov/patch

x/ante/batch.go#L70

Added line #L70 was not covered by tests
}

return next(ctx, txWithUnwrappedMsgs{feeTx, unwrappedMsgs}, simulate)
}

0 comments on commit fb9b367

Please sign in to comment.