@@ -440,7 +440,7 @@ func (s *PrivateAccountAPI) signTransaction(ctx context.Context, args *Transacti
440
440
return nil , err
441
441
}
442
442
// Set some sanity defaults and terminate on failure
443
- if err := args .setDefaults (ctx , s .b ); err != nil {
443
+ if err := args .setDefaults (ctx , s .b , false ); err != nil {
444
444
return nil , err
445
445
}
446
446
// Assemble the transaction and sign with the wallet
@@ -2020,14 +2020,8 @@ func AccessList(ctx context.Context, b Backend, blockNrOrHash rpc.BlockNumberOrH
2020
2020
}
2021
2021
owner := common.Address {}
2022
2022
2023
- // If the gas amount is not set, default to RPC gas cap.
2024
- if args .Gas == nil {
2025
- tmp := hexutil .Uint64 (b .RPCGasCap ())
2026
- args .Gas = & tmp
2027
- }
2028
-
2029
2023
// Ensure any missing fields are filled, extract the recipient and input data
2030
- if err := args .setDefaults (ctx , b ); err != nil {
2024
+ if err := args .setDefaults (ctx , b , true ); err != nil {
2031
2025
return nil , 0 , nil , err
2032
2026
}
2033
2027
var to common.Address
@@ -2359,7 +2353,7 @@ func (s *PublicTransactionPoolAPI) SendTransaction(ctx context.Context, args Tra
2359
2353
}
2360
2354
2361
2355
// Set some sanity defaults and terminate on failure
2362
- if err := args .setDefaults (ctx , s .b ); err != nil {
2356
+ if err := args .setDefaults (ctx , s .b , false ); err != nil {
2363
2357
return common.Hash {}, err
2364
2358
}
2365
2359
// Assemble the transaction and sign with the wallet
@@ -2381,7 +2375,7 @@ func (s *PublicTransactionPoolAPI) SendTransaction(ctx context.Context, args Tra
2381
2375
// processing (signing + broadcast).
2382
2376
func (s * PublicTransactionPoolAPI ) FillTransaction (ctx context.Context , args TransactionArgs ) (* SignTransactionResult , error ) {
2383
2377
// Set some sanity defaults and terminate on failure
2384
- if err := args .setDefaults (ctx , s .b ); err != nil {
2378
+ if err := args .setDefaults (ctx , s .b , false ); err != nil {
2385
2379
return nil , err
2386
2380
}
2387
2381
// Assemble the transaction and obtain rlp
@@ -3286,7 +3280,7 @@ func (s *PublicTransactionPoolAPI) SignTransaction(ctx context.Context, args Tra
3286
3280
if args .Nonce == nil {
3287
3281
return nil , errors .New ("nonce not specified" )
3288
3282
}
3289
- if err := args .setDefaults (ctx , s .b ); err != nil {
3283
+ if err := args .setDefaults (ctx , s .b , false ); err != nil {
3290
3284
return nil , err
3291
3285
}
3292
3286
// Before actually sign the transaction, ensure the transaction fee is reasonable.
@@ -3335,7 +3329,7 @@ func (s *PublicTransactionPoolAPI) Resend(ctx context.Context, sendArgs Transact
3335
3329
if sendArgs .Nonce == nil {
3336
3330
return common.Hash {}, errors .New ("missing transaction nonce in transaction spec" )
3337
3331
}
3338
- if err := sendArgs .setDefaults (ctx , s .b ); err != nil {
3332
+ if err := sendArgs .setDefaults (ctx , s .b , false ); err != nil {
3339
3333
return common.Hash {}, err
3340
3334
}
3341
3335
matchTx := sendArgs .toTransaction ()
0 commit comments