mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-04-13 22:29:18 +02:00
fix bunker:// uri for chrome
This commit is contained in:
parent
3a8bea9bc0
commit
bbba484ce0
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user