fix: DID sync between Web5 and Federation, cloud peer names
- Web5 loads node DID from backend on mount (authoritative, survives rotation) - Federation rotation updates localStorage so Web5 picks up new DID - Cloud peer names: peerDisplayName() "Node-XXXX" instead of raw DID - Cloud hides onion addresses from peer cards - Sync timeout increased to 180s with better error message Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ffc8e25c17
commit
539dd53677
@ -865,6 +865,8 @@ async function rotateDid() {
|
|||||||
}>({ method: 'node.rotate-did', params: { password: rotatePassword.value } })
|
}>({ method: 'node.rotate-did', params: { password: rotatePassword.value } })
|
||||||
|
|
||||||
selfDid.value = result.new_did
|
selfDid.value = result.new_did
|
||||||
|
// Sync with Web5 view's localStorage DID
|
||||||
|
try { localStorage.setItem('neode_did', result.new_did) } catch { /* noop */ }
|
||||||
rotateSuccess.value = `DID rotated. Notifying peers...`
|
rotateSuccess.value = `DID rotated. Notifying peers...`
|
||||||
|
|
||||||
// Notify federation peers
|
// Notify federation peers
|
||||||
|
|||||||
@ -3768,6 +3768,13 @@ async function deleteIdentity() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
web5AnimationDone = true
|
web5AnimationDone = true
|
||||||
|
// Load the authoritative node DID from the backend (survives rotation)
|
||||||
|
rpcClient.getNodeDid().then(res => {
|
||||||
|
if (res.did && res.did !== storedDid.value) {
|
||||||
|
storedDid.value = res.did
|
||||||
|
try { localStorage.setItem('neode_did', res.did) } catch { /* noop */ }
|
||||||
|
}
|
||||||
|
}).catch(() => { /* use cached localStorage value */ })
|
||||||
loadPeers()
|
loadPeers()
|
||||||
loadReceivedMessages()
|
loadReceivedMessages()
|
||||||
loadIdentities()
|
loadIdentities()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user