Skip to content

Commit

Permalink
Fix scale enum encode
Browse files Browse the repository at this point in the history
  • Loading branch information
freehere107 committed Jul 27, 2023
1 parent b1476e0 commit 39a1681
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion types/Enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (e *Enum) Encode(data interface{}) string {
for _, st := range typeMap {
raw += EncodeWithOpt(st[1], valueStruct[st[0]], &ScaleDecoderOption{Spec: e.Spec, Metadata: e.Metadata})
}
return raw
return utiles.U8Encode(index) + raw
}
return utiles.U8Encode(index) + EncodeWithOpt(subType, value, &ScaleDecoderOption{Spec: e.Spec, Metadata: e.Metadata})
}
Expand Down
2 changes: 1 addition & 1 deletion types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (*Null) TypeStructString() string {
type Empty struct{ ScaleDecoder }

func (e *Empty) Process() {
e.Value = ""
e.Value = "NULL"
}

func (h *H160) Process() {
Expand Down

0 comments on commit 39a1681

Please sign in to comment.