mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-20 13:01:07 +02:00
fix bunker:// uri for chrome
This commit is contained in:
@@ -276,7 +276,8 @@ class NostrConnectService {
|
||||
fromBunkerURI(uri: string) {
|
||||
const url = new URL(uri);
|
||||
|
||||
const pubkey = url.host;
|
||||
// firefox puts pubkey part in host, chrome puts pubkey in pathname
|
||||
const pubkey = url.host || url.pathname.replace("//", "");
|
||||
if (!isHexKey(pubkey)) throw new Error("Invalid connection URI");
|
||||
const relays = url.searchParams.getAll("relay");
|
||||
if (relays.length === 0) throw new Error("Missing relays");
|
||||
|
Reference in New Issue
Block a user