From 8f704e4ea2ccaf8de692c3a8fa90fcf0c99948b1 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 7 Aug 2024 14:52:13 -0500 Subject: [PATCH] Fix account URL lookup with @ in the URL --- src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index eddf2623..3dae4e1c 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -38,7 +38,7 @@ function extractBech32(value: string): string | undefined { // Extract from URL, eg `https://njump.me/npub1q3sle0kvfsehgsuexttt3ugjd8xdklxfwwkh559wxckmzddywnws6cd26p`. case 'http:': case 'https:': - bech32 = uri.pathname.slice(1); + bech32 = uri.pathname.replace(/^\/@?/, ''); break; } } catch {