From 8268dfb3fbeca11ea16b2a5197d54474ba92ede8 Mon Sep 17 00:00:00 2001 From: Duncan Date: Wed, 5 Aug 2026 14:20:09 -0400 Subject: [PATCH] fix(desktop): use truncatePubkey in InstancesSheet Replace hand-rolled pubkey.slice() calls with the canonical truncatePubkey() helper from shared/lib/pubkey, as required by the check-pubkey-truncation gate. Co-authored-by: Will Pfleger Signed-off-by: Will Pfleger --- desktop/src/features/identity-archive/InstancesSheet.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/desktop/src/features/identity-archive/InstancesSheet.tsx b/desktop/src/features/identity-archive/InstancesSheet.tsx index cddecd5de..d56796850 100644 --- a/desktop/src/features/identity-archive/InstancesSheet.tsx +++ b/desktop/src/features/identity-archive/InstancesSheet.tsx @@ -2,6 +2,7 @@ import { Archive, Loader2, Server } from "lucide-react"; import { useOwnedAgentInventoryQuery } from "./hooks"; import { ProfileAvatar } from "@/features/profile/ui/ProfileAvatar"; +import { truncatePubkey } from "@/shared/lib/pubkey"; import { Badge } from "@/shared/ui/badge"; import { Button } from "@/shared/ui/button"; import { @@ -22,7 +23,7 @@ type InstanceRowProps = { }; function InstanceRow({ instance }: InstanceRowProps) { - const label = instance.displayName ?? `${instance.pubkey.slice(0, 16)}…`; + const label = instance.displayName ?? truncatePubkey(instance.pubkey); const isArchived = instance.archiveState.isArchived; return ( @@ -45,7 +46,7 @@ function InstanceRow({ instance }: InstanceRowProps) {

{label}

- {instance.pubkey.slice(0, 24)}… + {truncatePubkey(instance.pubkey)}

{isArchived === true ? (