Skip to content
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

fix(did-provider-pkh): refactor and simplify did:pkh plugin #1113

Merged
merged 7 commits into from
Feb 7, 2023

Conversation

dchagastelles
Copy link
Contributor

What issue is this PR fixing

There's no issue being fixed, just small improvements on did-provider-pkh plugin:

  • minor parameters corrections
  • use of namespace parameter
  • allow passing privateKey to import key directly on identifier creation

What is being changed

Only changing did-provider-pkh plugin.

Quality

Check all that apply:

  • I want these changes to be integrated
  • I successfully ran pnpm i, pnpm build, pnpm test, pnpm test:browser locally.
  • I allow my PR to be updated by the reviewers (to speed up the review process).
  • I added unit tests.
  • I added integration tests. [were already there]
  • I did not add automated tests because _________, and I am aware that a PR without tests will likely get rejected.

- use of namespace parameter
- allow passing privateKey to import key directly on identifier creation
@codecov
Copy link

codecov bot commented Feb 2, 2023

Codecov Report

Base: 85.13% // Head: 84.97% // Decreases project coverage by -0.16% ⚠️

Coverage data is based on head (4dd14b9) compared to base (60bc5fd).
Patch coverage: 60.81% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1113      +/-   ##
==========================================
- Coverage   85.13%   84.97%   -0.16%     
==========================================
  Files         140      140              
  Lines       14024    14050      +26     
  Branches     1422     1428       +6     
==========================================
  Hits        11939    11939              
- Misses       2085     2111      +26     
Impacted Files Coverage Δ
packages/did-provider-pkh/src/pkh-did-provider.ts 62.72% <58.55%> (-14.32%) ⬇️
packages/did-provider-pkh/src/resolver.ts 80.95% <67.56%> (+4.86%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@mirceanis mirceanis left a comment

Choose a reason for hiding this comment

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

Thanks for contributing this.

Since this is meant to clean up some code, I also made some notes that should make this align better with the patterns we use in other parts of the codebase.
It's mostly about error messages and debug output. Please take a look.

packages/did-provider-pkh/src/pkh-did-provider.ts Outdated Show resolved Hide resolved
packages/did-provider-pkh/src/pkh-did-provider.ts Outdated Show resolved Hide resolved
packages/did-provider-pkh/src/pkh-did-provider.ts Outdated Show resolved Hide resolved
packages/did-provider-pkh/src/pkh-did-provider.ts Outdated Show resolved Hide resolved
packages/did-provider-pkh/src/pkh-did-provider.ts Outdated Show resolved Hide resolved
packages/did-provider-pkh/src/resolver.ts Outdated Show resolved Hide resolved
packages/did-provider-pkh/src/pkh-did-provider.ts Outdated Show resolved Hide resolved
packages/did-provider-pkh/src/resolver.ts Outdated Show resolved Hide resolved
packages/did-provider-pkh/src/pkh-did-provider.ts Outdated Show resolved Hide resolved
Copy link
Member

@mirceanis mirceanis left a comment

Choose a reason for hiding this comment

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

Thanks for the updates.
I suggested some more tiny fixes.

packages/did-provider-pkh/src/pkh-did-provider.ts Outdated Show resolved Hide resolved
packages/did-provider-pkh/src/pkh-did-provider.ts Outdated Show resolved Hide resolved
packages/did-provider-pkh/src/resolver.ts Show resolved Hide resolved
packages/did-provider-pkh/src/resolver.ts Outdated Show resolved Hide resolved
@mirceanis mirceanis changed the title Improvements on did-provider-pkh plugin fix(did-provider-pkh): refactor and simplify did:pkh plugin Feb 7, 2023
@mirceanis mirceanis merged commit 42be48f into decentralized-identity:next Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants