Skip to content

Commit

Permalink
Fix check if info event was already published (#202)
Browse files Browse the repository at this point in the history
Co-authored-by: ekzyis <[email protected]>
  • Loading branch information
ekzyis and ekzyis authored Aug 19, 2024
1 parent 318d6e9 commit be7f227
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stores/nwc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export const useNWCStore = defineStore("nwc", {
// use NWCKind.NWCInfo as an integer here
let filterInfoEvent: NDKFilter = { kinds: [NWCKind.NWCInfo], authors: [conn.walletPublicKey] };
let eventsInfoEvent = await this.ndk.fetchEvents(filterInfoEvent);
if (!eventsInfoEvent) {
if (eventsInfoEvent.size === 0) {
await nip47InfoEvent.publish()
console.log("### published nip47InfoEvent", nip47InfoEvent)
} else {
Expand Down

0 comments on commit be7f227

Please sign in to comment.