Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions core/types/transaction_marshalling.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ func (tx *Transaction) MarshalJSON() ([]byte, error) {
enc.V = (*hexutil.Big)(itx.V)
enc.R = (*hexutil.Big)(itx.R)
enc.S = (*hexutil.Big)(itx.S)
// Only derive the chain ID if tx is signed and post EIP-155
if tx.Protected() {
enc.ChainID = (*hexutil.Big)(tx.ChainId())
}

case *AccessListTx:
enc.ChainID = (*hexutil.Big)(itx.ChainID)
Expand Down