internal/ethapi: fix chain ID check to return all non-zero IDs (#25244)

pull/24898/head
lightclient 2 years ago committed by GitHub
parent e394d01f2a
commit ae8ce72022
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      internal/ethapi/api.go

@ -1290,7 +1290,7 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber
switch tx.Type() {
case types.LegacyTxType:
// if a legacy transaction has an EIP-155 chain id, include it explicitly
if id := tx.ChainId(); id.Sign() == 0 {
if id := tx.ChainId(); id.Sign() != 0 {
result.ChainID = (*hexutil.Big)(id)
}
case types.AccessListTxType:

Loading…
Cancel
Save