Skip to content

Commit

Permalink
Revert Solana codec encoder from LenientCodecFromTypeCodec to strict
Browse files Browse the repository at this point in the history
  • Loading branch information
ilija42 committed Dec 24, 2024
1 parent 809f1ad commit f2416c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/solana/codec/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import (

type Encoder struct {
definitions map[string]Entry
codecFromTypeCodec encodings.LenientCodecFromTypeCodec
codecFromTypeCodec encodings.CodecFromTypeCodec
}

var _ commontypes.Encoder = &Encoder{}

func (e *Encoder) Encode(ctx context.Context, item any, itemType string) (res []byte, err error) {
if e.codecFromTypeCodec == nil {
e.codecFromTypeCodec = make(encodings.LenientCodecFromTypeCodec)
e.codecFromTypeCodec = make(encodings.CodecFromTypeCodec)
for k, v := range e.definitions {
e.codecFromTypeCodec[k] = v
}
Expand Down

0 comments on commit f2416c0

Please sign in to comment.