-
Notifications
You must be signed in to change notification settings - Fork 13
feat: Update to latest aries and support for submission requirement #640
Conversation
5db49f5
to
fa0b568
Compare
Codecov Report
@@ Coverage Diff @@
## main #640 +/- ##
==========================================
+ Coverage 87.55% 87.74% +0.19%
==========================================
Files 29 29
Lines 4258 4309 +51
==========================================
+ Hits 3728 3781 +53
+ Misses 309 308 -1
+ Partials 221 220 -1
Continue to review full report at Codecov.
|
c1adfcc
to
e77e19a
Compare
pkg/memcmdescriptor/provider.go
Outdated
if err != nil { | ||
return nil, fmt.Errorf("failed to unmarshal presentation"+ | ||
"definition: %w", err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to marshal first and then unmarshal the same thing ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have updated the logic to much simpler version , no longer require this
if credManifest.PresentationDefinition != nil { | ||
applicationAttachments, err := getAttachments(msg) | ||
if err != nil { | ||
return fmt.Errorf("failed to get request credential attachments: %w", err) | ||
} | ||
|
||
if len(applicationAttachments) != 1 { | ||
return errors.New("invalid request credential message, expected valid credential application") | ||
attachmentAsMap, ok := applicationAttachments[0].Data.JSON.(map[string]interface{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we use applicationAttachments[0].Data.JSON
and unmarshaling than type casting to map ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
e77e19a
to
48834ca
Compare
closes trustbloc#612 Signed-off-by: talwinder50 <talwinderkaur50@gmail.com>
48834ca
to
c8b721e
Compare
closes #612
Signed-off-by: talwinder50 talwinderkaur50@gmail.com