Skip to content

Commit

Permalink
rever renaming of convert MessageToCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
illia-malachyn committed Sep 12, 2024
1 parent 8345577 commit 9a012c2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion access/grpc/convert/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion access/grpc/convert/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions access/grpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand Down

0 comments on commit 9a012c2

Please sign in to comment.