diff --git a/src/api/hooks/nostr/useSignerStream.ts b/src/api/hooks/nostr/useSignerStream.ts index 35f4090d7..15662c262 100644 --- a/src/api/hooks/nostr/useSignerStream.ts +++ b/src/api/hooks/nostr/useSignerStream.ts @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react'; import { useNostr } from 'soapbox/contexts/nostr-context'; -import { NConnect } from 'soapbox/features/nostr/NConnect'; +import { NBunker } from 'soapbox/features/nostr/NBunker'; const secretStorageKey = 'soapbox:nip46:secret'; @@ -35,7 +35,7 @@ function useSignerStream() { useEffect(() => { if (!relay || !signer || !pubkey) return; - const connect = new NConnect({ + const bunker = new NBunker({ relay, signer, onAuthorize(authorizedPubkey) { @@ -51,7 +51,7 @@ function useSignerStream() { }); return () => { - connect.close(); + bunker.close(); }; }, [relay, signer, pubkey]); diff --git a/src/features/nostr/NConnect.ts b/src/features/nostr/NBunker.ts similarity index 98% rename from src/features/nostr/NConnect.ts rename to src/features/nostr/NBunker.ts index 7a1aa67fd..3bbe67b90 100644 --- a/src/features/nostr/NConnect.ts +++ b/src/features/nostr/NBunker.ts @@ -1,6 +1,6 @@ import { NRelay, NostrConnectRequest, NostrConnectResponse, NostrEvent, NostrSigner, NSchema as n } from '@nostrify/nostrify'; -interface NConnectOpts { +interface NBunkerOpts { relay: NRelay; signer: NostrSigner; authorizedPubkey: string | undefined; @@ -9,7 +9,7 @@ interface NConnectOpts { getSecret(): string; } -export class NConnect { +export class NBunker { private relay: NRelay; private signer: NostrSigner; @@ -20,7 +20,7 @@ export class NConnect { private controller = new AbortController(); - constructor(opts: NConnectOpts) { + constructor(opts: NBunkerOpts) { this.relay = opts.relay; this.signer = opts.signer; this.authorizedPubkey = opts.authorizedPubkey;