From 109c137ec0fb873b4be3b6dc3125c70e2f4ec29e Mon Sep 17 00:00:00 2001 From: eduard-cl Date: Thu, 19 Dec 2024 12:14:09 +0100 Subject: [PATCH] simplify error handling --- core/chains/evm/txm/txm.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/chains/evm/txm/txm.go b/core/chains/evm/txm/txm.go index 2d29361ba1a..75ee2dcacbb 100644 --- a/core/chains/evm/txm/txm.go +++ b/core/chains/evm/txm/txm.go @@ -358,8 +358,7 @@ func (t *Txm) sendTransactionWithError(ctx context.Context, tx *types.Transactio } t.metrics.IncrementNumBroadcastedTxs(ctx) - err = t.metrics.EmitTxMessage(ctx, attempt.Hash, address, tx.ToAddress, *tx.Nonce) - if err != nil { + if err = t.metrics.EmitTxMessage(ctx, attempt.Hash, address, tx.ToAddress, *tx.Nonce); err != nil { t.lggr.Errorw("Beholder error emitting tx message", "err", err) }