From 3b27215e03aa42a33652e6b06172afa7b6da557e Mon Sep 17 00:00:00 2001 From: static Date: Wed, 6 Dec 2023 04:55:02 +0000 Subject: [PATCH] use v2.NewReceipt for eth type receipt --- rpc/transaction.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/rpc/transaction.go b/rpc/transaction.go index 7ee27e7a9..4106425c2 100644 --- a/rpc/transaction.go +++ b/rpc/transaction.go @@ -751,7 +751,7 @@ func (s *PublicTransactionService) GetTransactionReceipt( return nil, err } return NewStructuredResponse(RPCReceipt) - case V2: + case V2, Eth: if tx == nil { RPCReceipt, err = v2.NewReceipt(stx, blockHash, blockNumber, index, receipt) } else { @@ -761,14 +761,6 @@ func (s *PublicTransactionService) GetTransactionReceipt( return nil, err } return NewStructuredResponse(RPCReceipt) - case Eth: - if tx != nil { - RPCReceipt, err = eth.NewReceipt(tx.ConvertToEth(), blockHash, blockNumber, index, receipt) - } - if err != nil { - return nil, err - } - return NewStructuredResponse(RPCReceipt) default: return nil, ErrUnknownRPCVersion }