From 853b07af34649e1dd266017f7a2f7b2daf5d939a Mon Sep 17 00:00:00 2001 From: Martin HS Date: Sat, 30 Dec 2023 17:09:43 +0100 Subject: [PATCH] Update ethclient/ethclient.go --- ethclient/ethclient.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ethclient/ethclient.go b/ethclient/ethclient.go index 7a1c42f96e..7290bacc80 100644 --- a/ethclient/ethclient.go +++ b/ethclient/ethclient.go @@ -306,8 +306,7 @@ func (ec *Client) TransactionInBlock(ctx context.Context, blockHash common.Hash, // Note that the receipt is not available for pending transactions. func (ec *Client) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) { var r *types.Receipt - err := ec.c.CallContext(ctx, &r, "eth_getTransactionReceipt", txHash) - if err != nil { + if err := ec.c.CallContext(ctx, &r, "eth_getTransactionReceipt", txHash); err != nil { return nil, err } if r == nil {