mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
typo
This commit is contained in:
parent
aa0727a96d
commit
6691908fc4
1 changed files with 1 additions and 2 deletions
|
|
@ -106,7 +106,6 @@ function truncate(s: string, len: number, ellipsis = '…') {
|
|||
* @returns The handle
|
||||
*/
|
||||
export async function getHandle(id: string, acc?: ProfileInfo) {
|
||||
console.debug({ id, name });
|
||||
let handle: string | undefined = '';
|
||||
|
||||
const handlePubkey = async (pubkey: string) => {
|
||||
|
|
@ -122,7 +121,7 @@ export async function getHandle(id: string, acc?: ProfileInfo) {
|
|||
};
|
||||
|
||||
if (/[a-z0-9]{64}/.test(id)) {
|
||||
await handlePubkey(id);
|
||||
handle = await handlePubkey(id);
|
||||
} else if (n.bech32().safeParse(id).success) {
|
||||
if (id.startsWith('npub')) {
|
||||
handle = await handlePubkey(nip19.decode(id as `npub1${string}`).data);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue