diff --git a/packages/system-react/package.json b/packages/system-react/package.json index 40d826ce..e3456954 100644 --- a/packages/system-react/package.json +++ b/packages/system-react/package.json @@ -1,6 +1,6 @@ { "name": "@snort/system-react", - "version": "1.6.0", + "version": "1.6.1", "description": "React hooks for @snort/system", "main": "dist/index.js", "module": "src/index.ts", @@ -17,7 +17,7 @@ ], "dependencies": { "@snort/shared": "^1.0.17", - "@snort/system": "^1.6.0", + "@snort/system": "^1.6.1", "react": "^18.2.0" }, "devDependencies": { diff --git a/packages/system/package.json b/packages/system/package.json index 47a185c8..31f4c3dd 100644 --- a/packages/system/package.json +++ b/packages/system/package.json @@ -1,6 +1,6 @@ { "name": "@snort/system", - "version": "1.6.0", + "version": "1.6.1", "description": "Snort nostr system package", "type": "module", "main": "dist/index.js", diff --git a/packages/system/src/nostr.ts b/packages/system/src/nostr.ts index c88ea894..21e4d6b5 100644 --- a/packages/system/src/nostr.ts +++ b/packages/system/src/nostr.ts @@ -14,7 +14,7 @@ export interface TaggedNostrEvent extends NostrEvent { /** * A list of relays this event was seen on */ - relays: Array; + relays?: Array; /** * Additional context diff --git a/packages/system/src/note-collection.ts b/packages/system/src/note-collection.ts index 077cd8f2..af1e29fe 100644 --- a/packages/system/src/note-collection.ts +++ b/packages/system/src/note-collection.ts @@ -1,4 +1,4 @@ -import { SortedMap, dedupe } from "@snort/shared"; +import { SortedMap, appendDedupe, dedupe } from "@snort/shared"; import { EventExt, EventType, TaggedNostrEvent } from "."; import { findTag } from "./utils"; import { EventEmitter } from "eventemitter3"; @@ -72,7 +72,7 @@ export class KeyedReplaceableNoteStore extends HookedNoteStore { const existing = this.#events.get(keyOnEvent); if (a.created_at > (existing?.created_at ?? 0)) { if (existing) { - a.relays = dedupe([...(existing.relays ?? []), ...a.relays]); + a.relays = appendDedupe(existing.relays, a.relays); } this.#events.set(keyOnEvent, a); changes.push(a); diff --git a/packages/wallet/package.json b/packages/wallet/package.json index e529d191..e695eb6a 100644 --- a/packages/wallet/package.json +++ b/packages/wallet/package.json @@ -1,6 +1,6 @@ { "name": "@snort/wallet", - "version": "0.2.3", + "version": "0.2.4", "description": "Snort wallet system package", "type": "module", "main": "dist/index.js", @@ -23,7 +23,7 @@ "@lightninglabs/lnc-web": "^0.3.1-alpha", "@scure/base": "^1.1.6", "@snort/shared": "^1.0.17", - "@snort/system": "^1.6.0", + "@snort/system": "^1.6.1", "debug": "^4.3.4", "eventemitter3": "^5.0.1" }, diff --git a/packages/worker-relay/package.json b/packages/worker-relay/package.json index c1e61d26..238c2391 100644 --- a/packages/worker-relay/package.json +++ b/packages/worker-relay/package.json @@ -1,6 +1,6 @@ { "name": "@snort/worker-relay", - "version": "1.3.0", + "version": "1.3.1", "description": "A nostr relay in a service worker", "main": "dist/index.js", "types": "dist/index.d.ts",