Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Nov 9, 2023
1 parent 28268aa commit 2045936
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions x/fungible/keeper/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,20 +653,20 @@ func (k Keeper) CallEVMWithData(

if res.Failed() {
return res, cosmoserrors.Wrap(evmtypes.ErrVMExecution, fmt.Sprintf("%s: ret 0x%x", res.VmError, res.Ret))
} else {
// call PostTxProcessing hook
receipt := &ethtypes.Receipt{
Logs: logs,
TxHash: common.HexToHash(res.Hash),
}
if err = k.evmKeeper.PostTxProcessing(ctx, msg, receipt); err != nil {
// if post-processing return error, revert the whole tx
k.Logger(ctx).Error("tx post processing failed", "error", err)
return nil, cosmoserrors.Wrap(evmtypes.ErrPostTxProcessing, err.Error())
}
}

// Emit events and log for the transaction if it is committed
// call PostTxProcessing hook
receipt := &ethtypes.Receipt{
Logs: logs,
TxHash: common.HexToHash(res.Hash),
}
if err = k.evmKeeper.PostTxProcessing(ctx, msg, receipt); err != nil {
// if post-processing return error, revert the whole tx
k.Logger(ctx).Error("tx post processing failed", "error", err)
return nil, cosmoserrors.Wrap(evmtypes.ErrPostTxProcessing, err.Error())
}

// emit events and log for the transaction if it is committed
if commit {
msgBytes, err := json.Marshal(msg)
if err != nil {
Expand Down

0 comments on commit 2045936

Please sign in to comment.