From c45c453d57d721a5120186ab02e6d2e4841c822c Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Sun, 9 Jun 2024 12:43:56 -0400 Subject: [PATCH] cleanup --- ethergo/util/converter_test.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ethergo/util/converter_test.go b/ethergo/util/converter_test.go index c039129531..f21b636f59 100644 --- a/ethergo/util/converter_test.go +++ b/ethergo/util/converter_test.go @@ -36,11 +36,15 @@ func TestTxToCall(t *testing.T) { Equal(t, mockTxAsCall.From, acct.Address) Equal(t, mockTxAsCall.To, mockedSignedTx.To()) Equal(t, mockTxAsCall.Gas, mockedSignedTx.Gas()) - Equal(t, mockTxAsCall.GasPrice, mockedSignedTx.GasPrice()) Equal(t, mockTxAsCall.Data, mockedSignedTx.Data()) Equal(t, mockTxAsCall.AccessList, mockedSignedTx.AccessList()) - Equal(t, mockTxAsCall.GasFeeCap, mockedSignedTx.GasFeeCap()) - Equal(t, mockTxAsCall.GasTipCap, mockedSignedTx.GasTipCap()) + + if mockedSignedTx.Type() == types.LegacyTxType { + Equal(t, mockTxAsCall.GasPrice, mockedSignedTx.GasPrice()) + } else { + Equal(t, mockTxAsCall.GasFeeCap, mockedSignedTx.GasFeeCap()) + Equal(t, mockTxAsCall.GasTipCap, mockedSignedTx.GasTipCap()) + } } } }