From f7920efed47f6fd0c2ef905715ce928da5b393c1 Mon Sep 17 00:00:00 2001 From: Liran Cohen Date: Tue, 1 Oct 2024 16:10:53 -0400 Subject: [PATCH] did-resolution --- packages/agent/src/agent-did-resolver-cache.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/agent/src/agent-did-resolver-cache.ts b/packages/agent/src/agent-did-resolver-cache.ts index e2b2e210a..8fb9377e3 100644 --- a/packages/agent/src/agent-did-resolver-cache.ts +++ b/packages/agent/src/agent-did-resolver-cache.ts @@ -64,9 +64,10 @@ export class AgentDidResolverCache extends DidResolverCacheLevel implements DidR metadata : result.didDocumentMetadata, }; - // this will throw an error if the DID is not managed by the agent, or there is no difference between the stored and resolved DID try { - await this.agent.did.update({ portableDid, tenant: this.agent.agentDid.uri }); + // this will throw an error if the DID is not managed by the agent, or there is no difference between the stored and resolved DID + // We don't publish the DID in this case, as it was received by the resolver. + await this.agent.did.update({ portableDid, tenant: this.agent.agentDid.uri, publish: false }); } catch(error: any) { // if the error is not due to no changes detected, log the error if (error.message && !error.message.includes('No changes detected, update aborted')) {