Skip to content

Commit

Permalink
fix: correctly parse nostr-connect URL
Browse files Browse the repository at this point in the history
  • Loading branch information
verbiricha committed Mar 6, 2024
1 parent a3cb15d commit dd8fe82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export const NgineProvider = ({
if (url.includes("bunker://")) {
const asURL = new URL(url);
const relays = asURL.searchParams.getAll("relay");
const pubkey = asURL.pathname.replace(/^\/\//, "");
const pubkey = asURL.hostname || asURL.pathname.replace(/^\/\//, "");
return { relays, pubkey };
} else {
const user = await NDKUser.fromNip05(url, ndk);
Expand Down

0 comments on commit dd8fe82

Please sign in to comment.