Skip to content

Commit

Permalink
Consider a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
believethehype committed May 21, 2024
1 parent 89e9bc1 commit 4c06b96
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ require (
github.com/lnpay/lnpay-go v1.1.0
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/miekg/dns v1.1.58 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
Expand Down
8 changes: 8 additions & 0 deletions nostr.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,14 @@ func CreateNostrReceipt(zapEvent nostr.Event, invoice string) (nostr.Event, erro
nip57Receipt.Tags = nip57Receipt.Tags.AppendUnique(*eTag)
}

if aTags := zapEvent.Tags.GetAll([]string{"a"}); aTags != nil {
for _, s := range aTags {
if s.Key() == "a" {
nip57Receipt.Tags = nip57Receipt.Tags.AppendUnique(s)
}
}
}

err = nip57Receipt.Sign(nostrPrivkeyHex)
if err != nil {
return nostr.Event{}, err
Expand Down

0 comments on commit 4c06b96

Please sign in to comment.