Revert "renderAccount: fix crash encoding invalid pubkey"
This reverts commit ffda62a4b0
.
This commit is contained in:
parent
f30319bea2
commit
4e80fdcc7d
|
@ -31,13 +31,7 @@ async function renderAccount(
|
||||||
website,
|
website,
|
||||||
} = n.json().pipe(n.metadata()).catch({}).parse(event.content);
|
} = n.json().pipe(n.metadata()).catch({}).parse(event.content);
|
||||||
|
|
||||||
let npub: string;
|
const npub = nip19.npubEncode(pubkey);
|
||||||
try {
|
|
||||||
npub = nip19.npubEncode(pubkey);
|
|
||||||
} catch {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const parsed05 = await parseAndVerifyNip05(nip05, pubkey);
|
const parsed05 = await parseAndVerifyNip05(nip05, pubkey);
|
||||||
const role = event.user?.tags.find(([name]) => name === 'role')?.[1] ?? 'user';
|
const role = event.user?.tags.find(([name]) => name === 'role')?.[1] ?? 'user';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue