-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): ledger module registerPublicDid implementation #398
feat(core): ledger module registerPublicDid implementation #398
Conversation
Signed-off-by: Ariel Gentile <gentilester@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #398 +/- ##
==========================================
+ Coverage 86.52% 86.53% +0.01%
==========================================
Files 246 246
Lines 5010 5022 +12
Branches 788 791 +3
==========================================
+ Hits 4335 4346 +11
- Misses 675 676 +1
Continue to review full report at Codecov.
|
Signed-off-by: Ariel Gentile <gentilester@gmail.com>
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.
Nice work @genaris! I have one question
Signed-off-by: Ariel Gentile <gentilester@gmail.com>
response, | ||
}) | ||
|
||
return targetDid |
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.
One final nitpick: Maybe we shouldn't return the targetDid? It's already an input parameter, so it doesn't provide extra context to the method caller to return it. WDYT?
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.
Yes, you are right about that. Actually I left it for consistency with other methods from ledger service such as registerSchema
and registerCredentialDefinition
. Do you think it'd better to return void?
In that way, in the registerPublicDid test I can do a getPublicDid right after the DID registration (something I don't want to do because that that method is tested in a separate test, but probably should be the unique 'good' way to test it).
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 think it is fine for now. We can tackle this in a separate PR and overhaul all methods
Add missing implementation for registerPublicDid in ledger module.
Apart from ledger source files, there were some updates in ledger setup scripts in order to properly run the tests, as it is needed to have some permissions to write public DIDs.
Signed-off-by: Ariel Gentile gentilester@gmail.com