Skip to content

Commit

Permalink
fix: replace proto wrapper with new one
Browse files Browse the repository at this point in the history
  • Loading branch information
logicalangel committed Mar 27, 2024
1 parent 356f644 commit b929475
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/datasets/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ package datasets

import (
"encoding/json"

"github.com/KenshiTech/unchained/constants"
"github.com/golang/protobuf/ptypes/wrappers"
"github.com/rs/zerolog/log"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/wrapperspb"
)

func (m *EventLog) Protobuf() ([]byte, error) {
Expand Down Expand Up @@ -49,10 +48,7 @@ func ConvertInterfaceToAny(v interface{}) (*anypb.Any, error) {
log.Err(err)
return nil, constants.ErrInternalError
}

bytesValue := &wrappers.BytesValue{
Value: bytes,
}
bytesValue := wrapperspb.Bytes(bytes)

err = anypb.MarshalFrom(anyValue, bytesValue, proto.MarshalOptions{})
if err != nil {
Expand Down

0 comments on commit b929475

Please sign in to comment.