diff --git a/testutil/server.go b/testutil/server.go index d41d4778..e70cdfc8 100644 --- a/testutil/server.go +++ b/testutil/server.go @@ -248,14 +248,14 @@ func (t *TestServer) SendTxn(txn *ethgo.Transaction) (*ethgo.Receipt, error) { txn.From = t.Account(0) } - if txn.Type == ethgo.TransactionLegacy { + if txn.Type == ethgo.TransactionDynamicFee { + if txn.MaxPriorityFeePerGas == nil || txn.MaxPriorityFeePerGas.Cmp(big.NewInt(0)) == 0 { + txn.MaxPriorityFeePerGas = new(big.Int).SetUint64(DefaultGasPrice) + } + } else { if txn.GasPrice == 0 { txn.GasPrice = DefaultGasPrice } - } else if txn.Type == ethgo.TransactionDynamicFee { - if txn.MaxPriorityFeePerGas.Cmp(big.NewInt(0)) == 0 { - txn.MaxPriorityFeePerGas = new(big.Int).SetUint64(DefaultGasPrice) - } } if txn.Gas == 0 { txn.Gas = DefaultGasLimit