Skip to content

Commit

Permalink
Merge pull request #73 from jiftechnify/fix-adapter-rx-nostr
Browse files Browse the repository at this point in the history
Fix rx-nostr adapter
  • Loading branch information
jiftechnify authored Jul 17, 2023
2 parents 4923788 + f777959 commit 3a4813a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion packages/adapter-rx-nostr/src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ export class RxNostrAdapter implements NostrFetcherBackend {
resetAutoAbortTimer();
tx.send(event);
},
complete: () => tx.close(),
complete: () => {
closeSub();
tx.close();
},
});

const noticeSub = this.#rxNostr
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/interop/relayPoolTs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { RelayPool } from "nostr-relaypool";
import { defaultRelays, nHoursAgo } from "../utils";

const main = async () => {
// initialize fetcher based on nostr-relaypool's `RelayPool`
// initialize fetcher based on nostr-relaypool's RelayPool
const pool = new RelayPool();
const fetcher = NostrFetcher.withCustomPool(relayPoolAdapter(pool));

Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/interop/rxNostr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "websocket-polyfill";
import { defaultRelays, nHoursAgo } from "../utils";

const main = async () => {
// initialize fetcher based on nostr-relaypool's `RelayPool`
// initialize fetcher based on RxNostr
const rxNostr = createRxNostr();
const fetcher = NostrFetcher.withCustomPool(rxNostrAdapter(rxNostr));

Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/interop/simplePool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "websocket-polyfill";
import { defaultRelays, nHoursAgo } from "../utils";

const main = async () => {
// initialize fetcher based on nostr-tools `SimplePool`
// initialize fetcher based on nostr-tools SimplePool
const pool = new SimplePool();
const fetcher = NostrFetcher.withCustomPool(simplePoolAdapter(pool));

Expand Down

0 comments on commit 3a4813a

Please sign in to comment.