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

Tweaks for lastPublicKeyId and lastParamsId #484

Merged
merged 5 commits into from
Nov 22, 2024
Merged

Tweaks for lastPublicKeyId and lastParamsId #484

merged 5 commits into from
Nov 22, 2024

Conversation

olegnn
Copy link
Contributor

@olegnn olegnn commented Nov 20, 2024

Tweaks for lastPublicKeyId and lastParamsId

@@ -87,6 +87,14 @@ export default class DockInternalAccumulatorModule extends injectParams(
return (await this.counters(did)).keyCounter;
}

async lastParamsId(did) {
return await this.paramsCounter(did);
Copy link
Member

Choose a reason for hiding this comment

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

return await isnt needed, can just return the promise itself. same for lastPublicKeyId

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without return await in case of an Error, this function won't be included in the stack trace making debugging harder.
There was an eslint rule called no-return-await which is now deprecated, see https://eslint.org/docs/latest/rules/no-return-await and eslint/eslint#17345.

Copy link
Member

Choose a reason for hiding this comment

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

fair enough

@olegnn olegnn merged commit cf62e35 into master Nov 22, 2024
10 checks passed
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