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(oob): expose parseInvitation publicly #834

Conversation

berendsliedrecht
Copy link
Contributor

  • Quite a nice function to have outside of the framework for parsing qrcodes.

@berendsliedrecht berendsliedrecht requested a review from a team as a code owner June 3, 2022 11:37
@berendsliedrecht berendsliedrecht changed the title fix(oob): expose parseinvitation publicly fix(oob): expose parseInvitation publicly Jun 3, 2022
*
* @returns OutOfBandInvitation
*/
export const parseInvitation = async (invitationUrl: string): Promise<OutOfBandInvitation> => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export const parseInvitation = async (invitationUrl: string): Promise<OutOfBandInvitation> => {
export const parseInvitationUrl = async (invitationUrl: string): Promise<OutOfBandInvitation> => {

'InvitationUrl is invalid. It needs to contain one, and only one, of the following parameters: `oob`, `c_i` or `d_m`.'
)
public async parseInvitation(invitationUrl: string): Promise<OutOfBandInvitation> {
return await this.parseInvitation(invitationUrl)
Copy link
Contributor

Choose a reason for hiding this comment

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

This will cause an endless loop it seems?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah it should not be this. good catch haha

@codecov-commenter
Copy link

Codecov Report

Merging #834 (d58bc81) into main (a717a58) will increase coverage by 0.00%.
The diff coverage is 94.73%.

@@           Coverage Diff           @@
##             main     #834   +/-   ##
=======================================
  Coverage   87.76%   87.77%           
=======================================
  Files         439      440    +1     
  Lines       10854    10862    +8     
  Branches     1837     1837           
=======================================
+ Hits         9526     9534    +8     
  Misses       1267     1267           
  Partials       61       61           
Impacted Files Coverage Δ
packages/core/src/utils/parseInvitation.ts 92.85% <92.85%> (ø)
packages/core/src/index.ts 100.00% <100.00%> (ø)
packages/core/src/modules/oob/OutOfBandModule.ts 87.20% <100.00%> (+0.03%) ⬆️

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 a717a58...d58bc81. Read the comment docs.

@berendsliedrecht berendsliedrecht enabled auto-merge (squash) June 8, 2022 08:34
@berendsliedrecht berendsliedrecht merged commit 5767500 into openwallet-foundation:main Jun 8, 2022
@berendsliedrecht berendsliedrecht deleted the fix/expose-parseinvitation-public branch June 8, 2022 14:05
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.

3 participants