diff --git a/internal/ethapi/api_test.go b/internal/ethapi/api_test.go index 3f69f86144..bc6bf37a29 100644 --- a/internal/ethapi/api_test.go +++ b/internal/ethapi/api_test.go @@ -1037,11 +1037,8 @@ func TestSignBlobTransaction(t *testing.T) { } _, err = api.SignTransaction(context.Background(), argsFromTransaction(res.Tx, b.acc.Address)) - if err == nil { - t.Fatalf("should fail on blob transaction") - } - if !errors.Is(err, errBlobTxNotSupported) { - t.Errorf("error mismatch. Have: %v, want: %v", err, errBlobTxNotSupported) + if err != nil { + t.Fatalf("should not fail on blob transaction") } } diff --git a/signer/core/apitypes/types_test.go b/signer/core/apitypes/types_test.go index 761b2ef5af..daffdefc2a 100644 --- a/signer/core/apitypes/types_test.go +++ b/signer/core/apitypes/types_test.go @@ -72,10 +72,14 @@ func TestTxArgs(t *testing.T) { if err := json.Unmarshal(tc.data, &txArgs); err != nil { t.Fatal(err) } - if have := txArgs.ToTransaction().Type(); have != tc.wantType { + tx, err := txArgs.ToTransaction() + if err != nil { + t.Fatal(err) + } + if have := tx.Type(); have != tc.wantType { t.Errorf("test %d, have type %d, want type %d", i, have, tc.wantType) } - if have := txArgs.ToTransaction().Hash(); have != tc.want { + if have := tx.Hash(); have != tc.want { t.Errorf("test %d: have %v, want %v", i, have, tc.want) } d2, err := json.Marshal(txArgs)