From e2d48519f1c77d9372ce091bed4a323ba37422c4 Mon Sep 17 00:00:00 2001 From: Tasos Derisiotis <50984242+Eengineer1@users.noreply.github.com> Date: Tue, 7 Jan 2025 19:31:53 +0200 Subject: [PATCH] fix: Bypass deep check --- x/did/types/diddoc_diddoc_test.go | 2 +- x/did/utils/str.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/x/did/types/diddoc_diddoc_test.go b/x/did/types/diddoc_diddoc_test.go index 519db3905..c3ebd4e79 100644 --- a/x/did/types/diddoc_diddoc_test.go +++ b/x/did/types/diddoc_diddoc_test.go @@ -273,7 +273,7 @@ var _ = DescribeTable("DIDDoc Validation tests", func(testCase DIDDocTestCase) { }, AssertionMethod: []string{fmt.Sprintf("%s#fragment", ValidTestDID), func() string { b, _ := json.Marshal(AssertionMethodJSONUnescaped{ - Id: fmt.Sprintf("%s#fragment-1", ValidTestDID), + Id: fmt.Sprintf("%s#fragment", ValidTestDID), Type: "Ed25519VerificationKey2018", Controller: ValidTestDID, PublicKeyBase58: &ValidEd25519VerificationKey2018VerificationMaterial, // arbitrarily chosen, loosely validated diff --git a/x/did/utils/str.go b/x/did/utils/str.go index 9e951cf16..dec31ab4e 100644 --- a/x/did/utils/str.go +++ b/x/did/utils/str.go @@ -116,6 +116,9 @@ func ValidateProtobufFields(jsonString string) error { } for key, value := range input { + if key == "metadata" { + continue + } switch value.(type) { case string, int, int32, int64, float32, float64, bool, proto.Message: continue