-
Notifications
You must be signed in to change notification settings - Fork 9
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
Set issuer resolver #762
Conversation
@@ -109,7 +110,7 @@ export class ClaimsService { | |||
private _claimManagerInterface = ClaimManager__factory.createInterface(); | |||
private _claimRevocation: ClaimRevocation; | |||
private _issuerVerification: IssuerVerification; | |||
private _issuerResolver: EthersProviderIssuerResolver; | |||
private _issuerResolver?: IssuerResolver; |
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.
@JGiter why the addition of the ?
? Is there a code path wherein _issuerResolver
is undefined?
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 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?
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.
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....
private _issuerResolver?: IssuerResolver; | |
private _issuerResolver: IssuerResolver; |
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.
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
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.
Actually typescript indeed reject not initialized _issuerResolver if enable strictPropertyInitialization
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.
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 👍
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.
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; |
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.
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 👍
🎉 This PR is included in version 8.1.0-alpha.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 8.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.