From 599a3176240a861d0d3986348b300a784e596666 Mon Sep 17 00:00:00 2001 From: Madhur Shrimal Date: Wed, 26 Jun 2024 17:41:46 -0700 Subject: [PATCH] remove logs and send error --- chainio/clients/elcontracts/writer.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chainio/clients/elcontracts/writer.go b/chainio/clients/elcontracts/writer.go index aa44dc38..a2e93bee 100644 --- a/chainio/clients/elcontracts/writer.go +++ b/chainio/clients/elcontracts/writer.go @@ -3,6 +3,7 @@ package elcontracts import ( "context" "errors" + "github.com/Layr-Labs/eigensdk-go/utils" "math/big" @@ -311,7 +312,6 @@ func (w *ELChainWriter) SetClaimerFor( return nil, errors.New("RewardsCoordinator contract not provided") } - w.logger.Infof("setting claimer %s", claimer) noSendTxOpts, err := w.txMgr.GetNoSendTxOpts() if err != nil { return nil, err @@ -323,9 +323,8 @@ func (w *ELChainWriter) SetClaimerFor( } receipt, err := w.txMgr.Send(ctx, tx) if err != nil { - return nil, errors.New("failed to send tx with err: " + err.Error()) + return nil, utils.WrapError("failed to send tx", err) } - w.logger.Infof("set claimer %s successful", claimer) return receipt, nil }