diff --git a/ndk/src/signers/nip46/index.ts b/ndk/src/signers/nip46/index.ts index 08f65eb9..0b7072bd 100644 --- a/ndk/src/signers/nip46/index.ts +++ b/ndk/src/signers/nip46/index.ts @@ -95,7 +95,7 @@ export class NDKNip46Signer extends EventEmitter implements NDKSigner { private connectionTokenInit(connectionToken: string) { const bunkerUrl = new URL(connectionToken); - const bunkerPubkey = bunkerUrl.hostname; + const bunkerPubkey = bunkerUrl.hostname || bunkerUrl.pathname.replace(/^\/\//, ""); const userPubkey = bunkerUrl.searchParams.get("pubkey"); const relayUrls = bunkerUrl.searchParams.getAll("relay"); const secret = bunkerUrl.searchParams.get("secret");