internal/ethapi: support both input and data for personal_sendTransaction (#23476)

This commit is contained in:
JukLee0ira 2024-08-12 18:27:17 +08:00 committed by Daniel Liu
parent 138ac7c967
commit 925c20061d

View file

@ -99,12 +99,13 @@ func (args *TransactionArgs) setDefaults(ctx context.Context, b Backend) error {
if args.Gas == nil {
// These fields are immutable during the estimation, safe to
// pass the pointer directly.
data := args.data()
callArgs := TransactionArgs{
From: args.From,
To: args.To,
GasPrice: args.GasPrice,
Value: args.Value,
Data: args.Data,
Data: (*hexutil.Bytes)(&data),
AccessList: args.AccessList,
}
pendingBlockNr := rpc.BlockNumberOrHashWithNumber(rpc.PendingBlockNumber)