From a1765cd7715018776c31e7c995238d35aaf560b2 Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Thu, 2 May 2024 11:02:46 -0700 Subject: [PATCH] don't use NewString --- flowkit_test.go | 4 +--- mocks/services_mock.go | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/flowkit_test.go b/flowkit_test.go index 6dddddee..1617d505 100644 --- a/flowkit_test.go +++ b/flowkit_test.go @@ -1372,9 +1372,7 @@ func TestScripts(t *testing.T) { gw.ExecuteScript.Run(func(args mock.Arguments) { assert.Len(t, string(args.Get(1).([]byte)), 86) assert.Equal(t, "\"Foo\"", args.Get(2).([]cadence.Value)[0].String()) - retVal, err := cadence.NewString("") - require.NoError(t, err) - gw.ExecuteScript.Return(retVal, nil) + gw.ExecuteScript.Return(cadence.String(""), nil) }) args := []cadence.Value{cadence.String("Foo")} diff --git a/mocks/services_mock.go b/mocks/services_mock.go index 5bc325bf..b19c676e 100644 --- a/mocks/services_mock.go +++ b/mocks/services_mock.go @@ -207,8 +207,7 @@ func DefaultMockServices() *MockServices { }) t.ExecuteScript.Run(func(args mock.Arguments) { - retVal, err := cadence.NewString("") - t.ExecuteScript.Return(retVal, err) + t.ExecuteScript.Return(cadence.String(""), nil) }) t.GetTransactionByID.Return(tests.NewTransaction(), nil)