fix(web5): carry node DID through to Connected Nodes routing

The backend already sends did in federation peer lists, but the Peer
type omitted it and federationNodeToPeer() dropped it when mapping. Add
did?: string to Peer and pass node.did through, so trusted/observer
node rows route to Federation/Mesh by their real DID (falling back to
pubkey/onion) instead of failing the build on a missing property.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
archipelago 2026-06-16 14:02:16 -04:00
parent 7e84434ff6
commit a569104620
2 changed files with 2 additions and 1 deletions

View File

@ -408,6 +408,7 @@ function federationNodeToPeer(node: FederationNode): Peer {
return {
onion: node.onion,
pubkey: node.pubkey,
did: node.did,
name: node.name || `Federation: ${node.did?.slice(0, 16) || 'node'}`,
}
}

View File

@ -159,4 +159,4 @@ export interface DwnMessageEntry {
export type VisibilityLevel = 'hidden' | 'discoverable' | 'public'
export type Peer = { onion: string; pubkey: string; name?: string }
export type Peer = { onion: string; pubkey: string; name?: string; did?: string }