Skip to content

Commit

Permalink
Migrate to Lens v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoginth committed Dec 14, 2024
1 parent 7de27f9 commit 73af321
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/helpers/getAccount.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Account } from "@hey/indexer";
import formatAddress from "./formatAddress";
import sanitizeDisplayName from "./sanitizeDisplayName";

const getAccount = (
Expand All @@ -24,7 +25,8 @@ const getAccount = (
}

const prefix = account.username ? "@" : "#";
const username = account.username?.localName || account.address;
const username =
account.username?.localName || formatAddress(account.address);
const link = account.username
? `/u/${account.username.localName}`
: `/account/${account.address}`;
Expand Down

0 comments on commit 73af321

Please sign in to comment.