use v2.NewReceipt for eth type receipt

pull/4582/head
static 12 months ago
parent 86fca2070f
commit 3b27215e03
  1. 10
      rpc/transaction.go

@ -751,7 +751,7 @@ func (s *PublicTransactionService) GetTransactionReceipt(
return nil, err return nil, err
} }
return NewStructuredResponse(RPCReceipt) return NewStructuredResponse(RPCReceipt)
case V2: case V2, Eth:
if tx == nil { if tx == nil {
RPCReceipt, err = v2.NewReceipt(stx, blockHash, blockNumber, index, receipt) RPCReceipt, err = v2.NewReceipt(stx, blockHash, blockNumber, index, receipt)
} else { } else {
@ -761,14 +761,6 @@ func (s *PublicTransactionService) GetTransactionReceipt(
return nil, err return nil, err
} }
return NewStructuredResponse(RPCReceipt) 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: default:
return nil, ErrUnknownRPCVersion return nil, ErrUnknownRPCVersion
} }

Loading…
Cancel
Save