Skip to content

Commit

Permalink
chore: add test race and fix commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ZigBalthazar committed Sep 8, 2024
1 parent 4f590a4 commit 581c8c9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions types/envelope/envelope.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (c *CountEnvelope) UnmarshalJSON(data []byte) error {
}
if err := json.Unmarshal([]byte(arr[2].Raw), &countResult); err == nil && countResult.Count != nil {
c.Count = countResult.Count

return nil
}

Expand Down Expand Up @@ -300,7 +300,7 @@ func (v *CloseEnvelope) UnmarshalJSON(data []byte) error {
switch len(arr) {
case 2:
*v = CloseEnvelope(arr[1].Str)

return nil
default:

Expand All @@ -325,7 +325,7 @@ type ClosedEnvelope struct {
func (_ ClosedEnvelope) Label() string { return "CLOSED" }
func (c ClosedEnvelope) String() string {
v, _ := json.Marshal(c)

return string(v)
}

Expand Down
4 changes: 2 additions & 2 deletions types/event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (e *Event) Match(f filter.Filter) bool {
for _, v := range vals {
if v == t[1] {
containsValue = true

break
}
}
Expand Down Expand Up @@ -147,6 +147,6 @@ func (e *Event) IsValid() (bool, error) {

// check signature
hash := sha256.Sum256(e.Serialize())

return sig.Verify(hash[:], pubkey), nil
}
2 changes: 1 addition & 1 deletion types/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ func MarshalTo(tags []Tag, dst []byte) []byte {
dst = tag.MarshalTo(dst)
}
dst = append(dst, ']')

return dst
}

0 comments on commit 581c8c9

Please sign in to comment.