Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

feat: Update to latest aries and support for submission requirement #640

Merged
merged 1 commit into from
Mar 1, 2022

Conversation

talwinder50
Copy link
Member

closes #612

Signed-off-by: talwinder50 talwinderkaur50@gmail.com

@cla-bot cla-bot bot added the cla-signed label Feb 28, 2022
@talwinder50 talwinder50 force-pushed the issue-545 branch 2 times, most recently from 5db49f5 to fa0b568 Compare February 28, 2022 11:03
@codecov
Copy link

codecov bot commented Feb 28, 2022

Codecov Report

Merging #640 (c8b721e) into main (f4a3138) will increase coverage by 0.19%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
pkg/memcmdescriptor/provider.go 100.00% <100.00%> (ø)
pkg/restapi/issuer/operation/operations.go 88.65% <100.00%> (+0.13%) ⬆️
pkg/restapi/rp/operation/operations.go 84.92% <0.00%> (+0.01%) ⬆️
pkg/route/service.go 93.30% <0.00%> (+2.49%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4a3138...c8b721e. Read the comment docs.

if err != nil {
return nil, fmt.Errorf("failed to unmarshal presentation"+
"definition: %w", err)
}
Copy link
Member

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 ?

Copy link
Member Author

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{})
Copy link
Member

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 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

closes trustbloc#612

Signed-off-by: talwinder50 <talwinderkaur50@gmail.com>
@talwinder50 talwinder50 merged commit ecc4908 into trustbloc:main Mar 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for submission requirement for WACI
3 participants