diff --git a/internal/cli/server/api_service.go b/internal/cli/server/api_service.go index 87787a9826..f6783804c1 100644 --- a/internal/cli/server/api_service.go +++ b/internal/cli/server/api_service.go @@ -66,20 +66,20 @@ func (s *Server) GetTransactionReceipt(ctx context.Context, req *protobor.Receip return nil, err } - receipt, err := s.backend.APIBackend.GetReceipts(ctx, blockHash) + receipts, err := s.backend.APIBackend.GetReceipts(ctx, blockHash) if err != nil { return nil, err } - if receipt == nil { - return nil, errors.New("no receipt found") + if receipts == nil { + return nil, errors.New("no receipts found") } - if len(receipt) <= int(txnIndex) { + if len(receipts) <= int(txnIndex) { return nil, errors.New("transaction index out of bounds") } - return &protobor.ReceiptResponse{Receipt: ConvertReceiptToProtoReceipt(receipt[txnIndex])}, nil + return &protobor.ReceiptResponse{Receipt: ConvertReceiptToProtoReceipt(receipts[txnIndex])}, nil } func (s *Server) GetBorBlockReceipt(ctx context.Context, req *protobor.ReceiptRequest) (*protobor.ReceiptResponse, error) { diff --git a/internal/cli/server/utils.go b/internal/cli/server/utils.go index 4fa8ba0960..aa461c9e92 100644 --- a/internal/cli/server/utils.go +++ b/internal/cli/server/utils.go @@ -71,7 +71,6 @@ func ConvertReceiptToProtoReceipt(receipt *types.Receipt) *protobor.Receipt { GasUsed: receipt.GasUsed, EffectiveGasPrice: receipt.EffectiveGasPrice.Int64(), BlobGasUsed: receipt.BlobGasUsed, - BlobGasPrice: receipt.BlobGasPrice.Int64(), BlockHash: protoutil.ConvertHashToH256(receipt.BlockHash), BlockNumber: receipt.BlockNumber.Int64(), TransactionIndex: uint64(receipt.TransactionIndex),