From ad8adcac156b4b386ac5e174d5652c2aa06c4941 Mon Sep 17 00:00:00 2001 From: daveroga Date: Thu, 25 Jul 2024 16:55:07 +0200 Subject: [PATCH] add type always in didResolutionMetadata --- pkg/document/did.go | 2 ++ pkg/services/did.go | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/document/did.go b/pkg/document/did.go index f49788b..c04571d 100644 --- a/pkg/document/did.go +++ b/pkg/document/did.go @@ -47,6 +47,8 @@ func NewDidResolution() *DidResolution { VerificationMethod: []verifiable.CommonVerificationMethod{}, }, DidResolutionMetadata: &DidResolutionMetadata{ + Context: []string{iden3ResolutionContext}, + Type: Iden3ResolutionMetadataType, ContentType: defaultContentType, Retrieved: time.Now(), }, diff --git a/pkg/services/did.go b/pkg/services/did.go index 51988a8..b72e651 100644 --- a/pkg/services/did.go +++ b/pkg/services/did.go @@ -161,7 +161,6 @@ func (d *DidDocumentServices) GetDidDocument(ctx context.Context, did string, op } didResolution.DidResolutionMetadata.Context = document.DidResolutionMetadataSigContext() - didResolution.DidResolutionMetadata.Type = document.Iden3ResolutionMetadataType didResolution.DidResolutionMetadata.Proof = append(didResolution.DidResolutionMetadata.Proof, eip712Proof) }