From 9a012c25b1fa452775d0983bf43be5a6ee2cb472 Mon Sep 17 00:00:00 2001 From: Illia Malachyn Date: Thu, 12 Sep 2024 17:18:54 +0300 Subject: [PATCH] rever renaming of convert MessageToCollection --- access/grpc/convert/convert.go | 2 +- access/grpc/convert/convert_test.go | 2 +- access/grpc/grpc.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/access/grpc/convert/convert.go b/access/grpc/convert/convert.go index 2b29c98e8..dcfd353af 100644 --- a/access/grpc/convert/convert.go +++ b/access/grpc/convert/convert.go @@ -267,7 +267,7 @@ func FullCollectionToTransactionsMessage(tx flow.FullCollection) ([]*entities.Tr return convertedTxs, nil } -func MessageToLightCollection(m *entities.Collection) (flow.Collection, error) { +func MessageToCollection(m *entities.Collection) (flow.Collection, error) { if m == nil { return flow.Collection{}, ErrEmptyMessage } diff --git a/access/grpc/convert/convert_test.go b/access/grpc/convert/convert_test.go index 670fb8314..2c255a301 100644 --- a/access/grpc/convert/convert_test.go +++ b/access/grpc/convert/convert_test.go @@ -143,7 +143,7 @@ func TestConvert_Collection(t *testing.T) { msg := CollectionToMessage(*colA) - colB, err := MessageToLightCollection(msg) + colB, err := MessageToCollection(msg) require.NoError(t, err) assert.Equal(t, *colA, colB) diff --git a/access/grpc/grpc.go b/access/grpc/grpc.go index fbe4c5d61..c352d7de7 100644 --- a/access/grpc/grpc.go +++ b/access/grpc/grpc.go @@ -306,7 +306,7 @@ func (c *BaseClient) GetCollection( return nil, newRPCError(err) } - result, err := convert.MessageToLightCollection(res.GetCollection()) + result, err := convert.MessageToCollection(res.GetCollection()) if err != nil { return nil, newMessageToEntityError(entityCollection, err) } @@ -328,7 +328,7 @@ func (c *BaseClient) GetLightCollectionByID( return nil, newRPCError(err) } - result, err := convert.MessageToLightCollection(res.GetCollection()) + result, err := convert.MessageToCollection(res.GetCollection()) if err != nil { return nil, newMessageToEntityError(entityCollection, err) }