@@ -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
@@ -2026,14 +2026,8 @@ func AccessList(ctx context.Context, b Backend, blockNrOrHash rpc.BlockNumberOrH
2026
2026
}
2027
2027
owner := common.Address {}
2028
2028
2029
- // If the gas amount is not set, default to RPC gas cap.
2030
- if args .Gas == nil {
2031
- tmp := hexutil .Uint64 (b .RPCGasCap ())
2032
- args .Gas = & tmp
2033
- }
2034
-
2035
2029
// Ensure any missing fields are filled, extract the recipient and input data
2036
- if err := args .setDefaults (ctx , b ); err != nil {
2030
+ if err := args .setDefaults (ctx , b , true ); err != nil {
2037
2031
return nil , 0 , nil , err
2038
2032
}
2039
2033
var to common.Address
@@ -2365,7 +2359,7 @@ func (s *PublicTransactionPoolAPI) SendTransaction(ctx context.Context, args Tra
2365
2359
}
2366
2360
2367
2361
// Set some sanity defaults and terminate on failure
2368
- if err := args .setDefaults (ctx , s .b ); err != nil {
2362
+ if err := args .setDefaults (ctx , s .b , false ); err != nil {
2369
2363
return common.Hash {}, err
2370
2364
}
2371
2365
// Assemble the transaction and sign with the wallet
@@ -2387,7 +2381,7 @@ func (s *PublicTransactionPoolAPI) SendTransaction(ctx context.Context, args Tra
2387
2381
// processing (signing + broadcast).
2388
2382
func (s * PublicTransactionPoolAPI ) FillTransaction (ctx context.Context , args TransactionArgs ) (* SignTransactionResult , error ) {
2389
2383
// Set some sanity defaults and terminate on failure
2390
- if err := args .setDefaults (ctx , s .b ); err != nil {
2384
+ if err := args .setDefaults (ctx , s .b , false ); err != nil {
2391
2385
return nil , err
2392
2386
}
2393
2387
// Assemble the transaction and obtain rlp
@@ -3292,7 +3286,7 @@ func (s *PublicTransactionPoolAPI) SignTransaction(ctx context.Context, args Tra
3292
3286
if args .Nonce == nil {
3293
3287
return nil , errors .New ("not specify Nonce" )
3294
3288
}
3295
- if err := args .setDefaults (ctx , s .b ); err != nil {
3289
+ if err := args .setDefaults (ctx , s .b , false ); err != nil {
3296
3290
return nil , err
3297
3291
}
3298
3292
// Before actually sign the transaction, ensure the transaction fee is reasonable.
@@ -3341,7 +3335,7 @@ func (s *PublicTransactionPoolAPI) Resend(ctx context.Context, sendArgs Transact
3341
3335
if sendArgs .Nonce == nil {
3342
3336
return common.Hash {}, errors .New ("missing transaction nonce in transaction spec" )
3343
3337
}
3344
- if err := sendArgs .setDefaults (ctx , s .b ); err != nil {
3338
+ if err := sendArgs .setDefaults (ctx , s .b , false ); err != nil {
3345
3339
return common.Hash {}, err
3346
3340
}
3347
3341
matchTx := sendArgs .toTransaction ()
0 commit comments