diff --git a/core/types/transaction_signing.go b/core/types/transaction_signing.go index 5f5a0f5687..4d58b45703 100644 --- a/core/types/transaction_signing.go +++ b/core/types/transaction_signing.go @@ -343,19 +343,11 @@ func (s eip2930Signer) SignatureValues(tx *Transaction, sig []byte) (R, S, V *bi switch txdata := tx.inner.(type) { case *LegacyTx: return s.EIP155Signer.SignatureValues(tx, sig) - case *AccessListTx: + case *AccessListTx, *DelegateTx: // Check that chain ID of tx matches the signer. We also accept ID zero here, // because it indicates that the chain ID was not specified in the tx. - if txdata.ChainID.Sign() != 0 && txdata.ChainID.Cmp(s.chainId) != 0 { - return nil, nil, nil, fmt.Errorf("%w: have %d want %d", ErrInvalidChainId, txdata.ChainID, s.chainId) - } - R, S, _ = decodeSignature(sig) - V = big.NewInt(int64(sig[64])) - case *DelegateTx: - // Check that chain ID of tx matches the signer. We also accept ID zero here, - // because it indicates that the chain ID was not specified in the tx. - if txdata.ChainID.Sign() != 0 && txdata.ChainID.Cmp(s.chainId) != 0 { - return nil, nil, nil, fmt.Errorf("%w: have %d want %d", ErrInvalidChainId, txdata.ChainID, s.chainId) + if txdata.chainID().Sign() != 0 && txdata.chainID().Cmp(s.chainId) != 0 { + return nil, nil, nil, fmt.Errorf("%w: have %d want %d", ErrInvalidChainId, txdata.chainID(), s.chainId) } R, S, _ = decodeSignature(sig) V = big.NewInt(int64(sig[64]))