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

Set issuer resolver #762

Merged
merged 3 commits into from
Jul 16, 2024
Merged

Set issuer resolver #762

merged 3 commits into from
Jul 16, 2024

Conversation

JGiter
Copy link
Collaborator

@JGiter JGiter commented Jul 16, 2024

No description provided.

@@ -109,7 +110,7 @@ export class ClaimsService {
private _claimManagerInterface = ClaimManager__factory.createInterface();
private _claimRevocation: ClaimRevocation;
private _issuerVerification: IssuerVerification;
private _issuerResolver: EthersProviderIssuerResolver;
private _issuerResolver?: IssuerResolver;
Copy link
Collaborator

@jrhender jrhender Jul 16, 2024

Choose a reason for hiding this comment

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

@JGiter why the addition of the ? ? Is there a code path wherein _issuerResolver is undefined?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I changed meaning of this field. Now this is overriding resolver, which might not be set. I will add comment. May be also rename it somehow?

Copy link
Collaborator

Choose a reason for hiding this comment

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

So you're saying this code wouldn't work? From my reading of the code it should be fine. I'm testing it out locally....

Suggested change
private _issuerResolver?: IssuerResolver;
private _issuerResolver: IssuerResolver;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Generally typescript should error this when strictProperyInitialization is true. In our configuration it is false, but error is not thrown even if to change it to true. May be this rule overwritten somewhere

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually typescript indeed reject not initialized _issuerResolver if enable strictPropertyInitialization

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah okay, I see. Good point about strictPropertyInitialization. However, as I think we currently have strictPropertyInitialization = false and as this would affect all of the other private properties in this class (and several other of the service classes), I'm not sure it makes sense to deviate from the pattern here. Not a big deal though. I think we can proceed either way 👍

@JGiter JGiter marked this pull request as ready for review July 16, 2024 12:26
Copy link
Collaborator

@jrhender jrhender left a comment

Choose a reason for hiding this comment

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

Thanks @JGiter , I think we should proceed 👍

@@ -109,7 +110,7 @@ export class ClaimsService {
private _claimManagerInterface = ClaimManager__factory.createInterface();
private _claimRevocation: ClaimRevocation;
private _issuerVerification: IssuerVerification;
private _issuerResolver: EthersProviderIssuerResolver;
private _issuerResolver?: IssuerResolver;
Copy link
Collaborator

Choose a reason for hiding this comment

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

ah okay, I see. Good point about strictPropertyInitialization. However, as I think we currently have strictPropertyInitialization = false and as this would affect all of the other private properties in this class (and several other of the service classes), I'm not sure it makes sense to deviate from the pattern here. Not a big deal though. I think we can proceed either way 👍

@JGiter JGiter merged commit 8cb5838 into develop Jul 16, 2024
6 of 7 checks passed
@JGiter JGiter deleted the feat/set-issuer-verification branch July 16, 2024 13:12
@ewf-devops
Copy link

🎉 This PR is included in version 8.1.0-alpha.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ewf-devops
Copy link

🎉 This PR is included in version 8.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants